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.
oscarr@gmail.com wrote:
>
> 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
--
Dave Peterson
Bookmarks