can you open a calander to select a date in excel?

L

lolo

Trying to click on a cell that will then open a calander to allow you to
select a date

Go to the vba editor, insert a new form into the workbook. On that
form, insert a Calendar Control. Go the code of the form (F7), insert
the following macro in there:

Private Sub cal1_Click()
ActiveCell.Value = cal1.Value
Unload Me
End Sub

(I assume you named the calendar control cal1)

Then go to the code of the worksheet, that you want that thing to work
on. Insert the following code:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.EnableEvents = False
calform.Show
Application.EnableEvents = True
End Sub

That's it.

Regards
lolo
 
Top