Hi there,
Ensure that you have the Controls Toolbox toolbar enabled/visible. Select
the 'More Controls' button, select Calendar Control 11.0 (or whatever
version you have). Create it on the screen, size to desired, place where
desired. Now ensure you are not in Design mode. Right click the sheet
tab/name of the sheet the control was placed on, select View Code, past
something like this in there ...
Option Explicit
Private Sub Calendar1_Click()
Dim Target As Range
Set Target = Selection
Application.EnableEvents = False
Target.Value = Me.Calendar1.Value
Me.Calendar1.Visible = False
Target.Activate
Application.EnableEvents = True
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count 1 Then Exit Sub
If Target.Address = "$A$1" Then
Me.Calendar1.Visible = True
Else
Me.Calendar1.Visible = False
End If
End Sub
Press Alt + Q to return to Excel. SAVE YOUR WORK BEFORE YOU TRY THIS. It's
just a good general rule. Works great for me though. It will appear when
somebody selects A1, select the date, it will put it in your selected cell
then make the control invisible again. Looks fairly seemless.
HTH
--
Regards,
Zack Barresse, aka firefytr
"tourmaline" wrote in message
...
Does anyone know if a cell can be formatted to allow a calendar pop up to
appear and date to be selected? If so, how and do you have to add in the
feature?
Thanks
|