Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

excel date picker control

I need to create an in cell date picker for a excel worksheet I'm creating.

I'm trying to follow this tutorial

However i cant understand how the example is supposed to place a calendar picker in cell A1:C1. In my worksheet, if i paste the code as is, it throws an error. if i try to modify it like so:

'Declaration
Public Function AddDateTimePicker(range As range, name As String) As DateTimePicker   

Private Sub ExcelRangeAddDateTimePicker()
Dim DateTimePicker1 As Microsoft.Office.Tools.Excel.Controls.DateTimePicker
DateTimePicker1 = Me.Controls.AddDateTimePicker(Me.range("A1", "C1"), "DateTimePicker1")       
End Sub

I get no result at all...

Any tip or answer is appreciated :)

like image 907
Ole Henrik Skogstrøm Avatar asked Nov 20 '12 10:11

Ole Henrik Skogstrøm


People also ask

How do I install Microsoft date and Time Picker control in Excel 365?

ocx is registered, restart Excel, go to the "Developer" tab, click "Insert" -> "More Controls", the Microsoft Date and Time Picker control will appear.

How do I add Microsoft date and Time Picker Control 6.0 SP6 in Excel?

Step 1: Click on the Insert tab in the Controls group and select More Controls from ActiveX Controls (bottom right of the list of controls). Step 2: Select Microsoft Date and Time Picker Control 6.0 (SP6) from the list and click OK. Step 3: To create the drop-down calendar in excel, click any location on the worksheet.

What happens if you don't have Microsoft date and Time Picker control?

If the tool doesn't show up in the More Controls dialog box, then it has not been installed on your system. If you are using a 64-bit version of Office, then you won't be able to install the control. The reason is because MSCOMCT2. OCX works only on 32-bit systems.


1 Answers

I found a better example for a working Excel 2010 Calander than what i had discovered previously.

This Tutorial is really good, and helps you to create a pop up Calander for Excel 2010: http://www.fontstuff.com/vba/vbatut07.htm

I found it at the bottom of the page linked by brettdj. Thank you :)

like image 66
Ole Henrik Skogstrøm Avatar answered Oct 05 '22 19:10

Ole Henrik Skogstrøm