Results 1 to 5 of 5

Checkbox reference

Threaded View

  1. #1
    Registered User
    Join Date
    11-16-2008
    Location
    Dubai
    Posts
    73

    Checkbox reference

    Afternoon all

    I am using the following code

    Sub Process_CheckBox()
    
        Dim cBox As CheckBox
        Dim LRow As Integer
        Dim LRange As String
    
        LName = Application.Caller
        Set cBox = ActiveSheet.CheckBoxes(LName)
    
        'Find row that checkbox resides in
        LRow = cBox.TopLeftCell.Row
        LRange = "B" & CStr(LRow)
    
        'Change date in column B, if checkbox is checked
        If cBox.Value > 0 Then
            ActiveSheet.Range(LRange).Value = Date
    
        'Clear date in column B, if checkbox is unchecked
        Else
            ActiveSheet.Range(LRange).Value = Null
        End If
    
    End Sub
    I would like to amend this for a single check box so to not look at the check box row column B but rather an actual reference of C21.

    Should eb fairly straight forward can someone help???

    Thanks

    N
    Last edited by Nick_in_Dubai; 03-12-2009 at 03:04 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1