Hello,
I use this for the excel pop up calendar,
Private Sub Calendar1_Click()
ActiveCell.Value = CDbl(Calendar1.Value)
ActiveCell.NumberFormat = " DDDD mm/dd/yyyy "
ActiveCell.Select
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Not Application.Intersect(Range("D3:D3,N3:N3,X3:X3,AH3:AH3,AR3:AR3,BB3:BB3,BL3:BL3,BV3:BV3,CF3:CF3,CP3:CP3,CZ3:CZ3,DJ3:DJ3"), Target) Is Nothing Then
Calendar1.Left = Target.Left + Target.Width - Calendar1.Width
Calendar1.Top = Target.Top + Target.Height
Calendar1.Visible = True
' select Today's date in the Calendar
If Not IsDate(Target.Value) = True Then
Calendar1.Value = Date
Else
Calendar1.Value = Target.Value
End If
ElseIf Calendar1.Visible Then Calendar1.Visible = False
End If
End Sub
If I protect some of my formula cells on the sheet,
and try to run the calendar, I ge terror message Run time error:1004
Any help is appreciated.
Thanks,
Sheets("MySheet").Unprotec
'''Your code here
Sheets("MySheet").Protect Password:="mypassword"