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

  • Thread starter Thread starter jcb
  • Start date Start date
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Creating a Calendar 2
drop down date 3
Re-occuring dates in excel cells 6
Insert Calander 0
NETWORKDAYS 3
Excel 2003 Count entries by months 2
Date Entry from Calander Control 1
Date Picker 1

Back
Top