ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   What is the best method to add a date picker to a spreadsheet? (https://www.excelbanter.com/excel-discussion-misc-queries/138677-what-best-method-add-date-picker-spreadsheet.html)

Paul

What is the best method to add a date picker to a spreadsheet?
 
I am trying to add a calendar control to a spreadsheet to function as a date
picker. I need to have a command button launch the calendar and then have
the date populate in a specific cell. I have added a user form and inserted
a Calendar Control 11 into the form. I do not know how to set the properties
of the calendar control to insert the date into a cell. The linkedcell
property is not available when the calendar control is inserted into the form.
Thanks, Paul.

Mike

What is the best method to add a date picker to a spreadsheet?
 
Is this what your looking for
Private Sub Calendar1_DblClick()
'replace Calendar1 with the name of your Name of Calendar
Sheet1.Range("A1").Value = Calendar1.Value
UserForm1.Hide
End Sub

"Paul" wrote:

I am trying to add a calendar control to a spreadsheet to function as a date
picker. I need to have a command button launch the calendar and then have
the date populate in a specific cell. I have added a user form and inserted
a Calendar Control 11 into the form. I do not know how to set the properties
of the calendar control to insert the date into a cell. The linkedcell
property is not available when the calendar control is inserted into the form.
Thanks, Paul.



All times are GMT +1. The time now is 09:27 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com