Set Day of Checkbox Change on Another Sheet

stusic

Board Regular
Joined
Dec 15, 2007
Messages
65
Office Version
  1. 365
Platform
  1. Windows
Hello All!

I've got a bunch of checkboxes on a sheet and, in the same cell of another sheet, I'd like to record when any of them are checked.

I understand I should use something like this to get the checkboxes:

VBA Code:
Set cb = ActiveSheet.CheckBoxes(Application.Caller)
If cb.Value = xlOn Then
...

I've seen a way to put the day on an offset cell of the same sheet:
Code:
With xChk.TopLeftCell.Offset(, 50)

This seems pretty simple, but I'm not sure how to iterate through them and place it in the corresponding cell on the other sheet and need some help :)
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Try this
VBA Code:
  Dim calleraddress As String
    
    With ActiveSheet.CheckBoxes(Application.Caller)
        If .Value = xlOff Then
            Exit Sub
        Else
            calleraddress = .TopLeftCell.Address(0, 0)
            Sheet2.Range(calleraddress) = Now
        End If
    End With
 
Upvote 1
Solution
Try this
VBA Code:
  Dim calleraddress As String
   
    With ActiveSheet.CheckBoxes(Application.Caller)
        If .Value = xlOff Then
            Exit Sub
        Else
            calleraddress = .TopLeftCell.Address(0, 0)
            Sheet2.Range(calleraddress) = Now
        End If
    End With
That is perfect! It seems much simpler than what I was trying to come up with, lol. I appreciate the help :)
 
Upvote 0

Forum statistics

Threads
1,215,079
Messages
6,123,005
Members
449,092
Latest member
masterms

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top