Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Insert Date with Check Box
I am trying to create a macro that would enter todays date (hard coded) on
the date that a checkbox was checked. The cell would be offset by two columns in the same row as the checkbox. Please advise. Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Insert Date with Check Box
....I guess I should also add that I have more than 50 checkboxes in this
worksheet. "ToddEZ" wrote: I am trying to create a macro that would enter todays date (hard coded) on the date that a checkbox was checked. The cell would be offset by two columns in the same row as the checkbox. Please advise. Thanks |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Insert Date with Check Box
Add a checkbox from the Forms toolbar and assign this macro to it.
Option Explicit Sub TestMe() dim myCBX as Checkbox set myCBX = activesheet.checkboxes(application.caller) mycbx.topleftcell.offset(0,2).value = date end sub or maybe: Option Explicit Sub TestMe() dim myCBX as Checkbox set myCBX = activesheet.checkboxes(application.caller) if mycbx.value = xlon then mycbx.topleftcell.offset(0,2).value = date else mycbx.topleftcell.offset(0,2).value = "" end if end sub Change the name (TestMe) to something that makes more sense to you. And then copy this checkbox 49 times. The assigned macro will "travel" with the copied checkbox. ToddEZ wrote: I am trying to create a macro that would enter todays date (hard coded) on the date that a checkbox was checked. The cell would be offset by two columns in the same row as the checkbox. Please advise. Thanks -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can I insert a date with an icon (calendar) insert | Excel Discussion (Misc queries) | |||
how do i insert a check box into excell 07 | Excel Discussion (Misc queries) | |||
Check Values/Insert Rows | Excel Programming | |||
How can I check a cell for current date and insert it if blank? | New Users to Excel | |||
check for insert row action... | Excel Programming |