P
Pam
I am running the following code which works great for inserting a date into a
cell with a calendar, but it only works great if they are in the right active
cell when they click the macro. I need to reduce errors by making the active
cell b1 when they start the macro, do that it will check the date in that
cell, and return the date in that cell.
I'm lost., any help would be appreciated.
Thanks
Private Sub UserForm_Initialize()
If IsDate(ActiveCell.Value) Then
Calendar1.Value = DateValue(ActiveCell.Value)
Else
Calendar1.Value = Date
Range("B1").Value = Date
End If
End Sub
cell with a calendar, but it only works great if they are in the right active
cell when they click the macro. I need to reduce errors by making the active
cell b1 when they start the macro, do that it will check the date in that
cell, and return the date in that cell.
I'm lost., any help would be appreciated.
Thanks
Private Sub UserForm_Initialize()
If IsDate(ActiveCell.Value) Then
Calendar1.Value = DateValue(ActiveCell.Value)
Else
Calendar1.Value = Date
Range("B1").Value = Date
End If
End Sub