P
Patty
I have the following code in my workbook to bring up a calendar.
Private Sub Calendar1_Click()
ActiveCell = Calendar1.Value
ActiveCell.NumberFormat = "mm/dd/yy"
End Sub
Private Sub UserForm_Activate()
Me.Calendar1.Value = Date
End Sub
When I choose a date on the calendar, I get the following message:
Run-time error '1004'
Unable to set the NumberFormat property of the range class
If I choose End, the date appears in the cell.
I want to publish this form on our website and don't want this message to
appear. It only happens when I protect the worksheet. The date cell is
unlocked.
How do I fix?
Private Sub Calendar1_Click()
ActiveCell = Calendar1.Value
ActiveCell.NumberFormat = "mm/dd/yy"
End Sub
Private Sub UserForm_Activate()
Me.Calendar1.Value = Date
End Sub
When I choose a date on the calendar, I get the following message:
Run-time error '1004'
Unable to set the NumberFormat property of the range class
If I choose End, the date appears in the cell.
I want to publish this form on our website and don't want this message to
appear. It only happens when I protect the worksheet. The date cell is
unlocked.
How do I fix?