Hello All,
I have been using a pop-up calendar that appears when specific cells are selected. It works great on my PC, but others in the office that will need to use his form do not have the MSCAL.ocx file. Our IT department does not want to load this on all of the users computers. Does anyone know of a way to get a popup calendar that would work similar to the code listed below?
Private Sub Calendar1_Click()
ActiveCell.Value = CDbl(Calendar1.Value)
ActiveCell.NumberFormat = "mm/dd/yyyy"
ActiveCell.Select
Calendar1.Visible = False
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Not Application.Intersect(Range("I3,I17,I18,F19:F20,C37:C45,D37:D45,G37:G45"), 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) Then
Calendar1.Value = Date
Else
Calendar1.Value = Target.Value
End If
ElseIf Calendar1.Visible Then Calendar1.Visible = False
End If
End Sub
Bookmarks