HI ALL
trying to insert pop up calendar found this vba works ok in new blank sheet but if I try to enter in to attached sheet come up error
I am trying to get pop up calendar in cells A8 to A150 & G8 to G150 with out success got excel calendar on ok but found vba on here but cant get it to work any help please need to be entered to every month
VBA CODE
Private Sub Calendar1_Click()
ActiveCell.Value = CDbl(Calendar1.Value)
ActiveCell.NumberFormat = "dd/mm/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("A8:A150"), 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
Calendar1.Value = Date
ElseIf Calendar1.Visible Then Calendar1.Visible = False
End If
End Sub
Bookmarks