View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
John[_22_] John[_22_] is offline
external usenet poster
 
Posts: 694
Default Calendar staying open

Hi Everyone
I'm using a Calendar to set dates on my form (worksheet)
I have to select the cell first before opening the calendar.
Question: Is it possible to have it open then select the cell.
If Yes is it possible that it stays open and install more then one date.
Using XL03 and my code below:

Private Sub UserForm_Initialize()
' Check if active cell contains a date. If 'yes' show
' same date on calendar. If 'no' show today's date.
If IsDate(ActiveCell.Value) Then
Calendar1.Value = DateValue(ActiveCell.Value)
Else
Calendar1.Value = Date
End If
End Sub

Private Sub Calendar1_Click()
' Transfer date selected on calendar to active cell
' and close UserForm.
ActiveCell.Value = Calendar1.Value
Unload Me
End Sub
--------------
Regards
John