PLEASE PLEASE HELP

O

oscarr

I Have an emergency... I deleted a macro !!!
I have 60 rows with checkboxes on cells A1 trough A60 that
automatically as checked were inserting current dates on the cell next
to it.
for some reason a disaster happened and the macro was deleted or messed
up.
I tried searching for help in these groups, but none so far. I found
one, but it is not a macro besides when I use that function all the
other previous dates keep changing when other checkboxes are checked
on in different days of the week.
If you can please guide me to the right answer I will appreciated. Hope
I made sense with my explanation
Thank you so very much.
Oscar
 
D

Dave Peterson

First, do you have an older copy of the workbook where you could copy the code?

If not, I put several checkboxes from the Forms toolbar on a worksheet.

I assigned this macro to each of them:

Option Explicit
Sub testme01()
Dim myCBX As CheckBox
Set myCBX = ActiveSheet.CheckBoxes(Application.Caller)

If myCBX.Value = xlOn Then
With myCBX.TopLeftCell.Offset(0, 1)
.Value = Date
.NumberFormat = "mm/dd/yyyy"
End With
Else
myCBX.TopLeftCell.Offset(0, 1).Value = ""
End If
End Sub


If the checkbox is checked, it puts the date. If it's not checked, it clears
that cell.
 
O

oscarr

It works !...It works !...It works !...It works !...
Thank you thank you thank you...
I love you ... I love you and I love you.... thank you thank you you
rescued me BIG TIME
 
D

Dave Peterson

So are you saying you got it to work??? <vbg>

It works !...It works !...It works !...It works !...
Thank you thank you thank you...
I love you ... I love you and I love you.... thank you thank you you
rescued me BIG TIME
 
O

oscarr

Yes. Thanks to you...
people like you that help others should have the best luck for the rest
of their life... kinda like karma. today for me, tomorrow for you :)
 
Top