DTPicker

pedie

Well-known Member
Joined
Apr 28, 2010
Messages
3,875
'm trying to insert this in userform but cant find DTPicker myself in controls....where is it located?:)
I show the sample from sample workbook i downloaded..


Thanks
Pedie
 
What type of control is being used in the file you download?
Where is it located? Userform or worksheet?
 
Upvote 0

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
When you select it in design view what does it say in the first line of it's property sheet?
It should be the name of the control followed by it's type.
 
Upvote 0
When you select it in design view what does it say in the first line of it's property sheet?
It should be the name of the control followed by it's type.


When i click on the control the one i downloaded

Code:
[/COLOR][/FONT]
[FONT=Courier New][COLOR=blue]Private Sub DTPicker1_CallbackKeyDown(ByVal KeyCode As Integer, ByVal Shift As Integer, ByVal CallbackField As String, CallbackDate As Date)[/COLOR][/FONT]
[FONT=Courier New][COLOR=blue]End Sub[/COLOR][/FONT]
[FONT=Courier New]Private Sub InsertButton_Click()[/FONT]
[FONT=Courier New]ActiveCell = DTPicker1.Value[/FONT]
[FONT=Courier New]ActiveCell.Columns.EntireColumn.AutoFit[/FONT]
[FONT=Courier New]End Sub[/FONT]
[FONT=Courier New]Private Sub UserForm_Initialize()[/FONT]
[FONT=Courier New]DTPicker1.Value = Date[/FONT]
[FONT=Courier New]End Sub[/FONT]
[FONT=Courier New]



the one i have in my userform which is calender 12.0 is

Code:
[FONT=Courier New]Option Explicit[/FONT]
[FONT=Courier New]Private Sub Calendar1_Click()[/FONT]
[FONT=Courier New]End Sub[/FONT]
 
Upvote 0
Pedie

It sounds like a date picker control, but I can't be 100% sure - if you tried what I suggested then I'd be more sure.

Anyway, let's say it is - if it works in the downloaded workbook then you should be able to use it in your own workbooks.

If you didn't have it the control then that workbook wouldn't work, or that part of it anyway, and you might get errors and other problems.

The full name of it is Microsoft Date and Time Picker Control 6.0 and it's part of the Microsoft Windows Common Controls-2 6.0 (mscomct2.ocx).

Under Additional Controls you should find it with the first name and when you add choose it there a reference will be added to the 2nd name.

If you goto Additonal Controls... and select Selected Items only you should see it near the top of the list.

If you goto Tools>Reference you should see the reference mentioned above below all the usual references.

Can you take a look and see if you have those things in the downloaded workbook?

PS If you do find them take a note of the path to mscomctl2.ocx
 
Upvote 0
Got it working....Thanks a lot everyone for helping...!!!


It sounds like a date picker control, but I can't be 100% sure - if you tried what I suggested then I'd be more sure.

Anyway, let's say it is - if it works in the downloaded workbook then you should be able to use it in your own workbooks.

If you didn't have it the control then that workbook wouldn't work, or that part of it anyway, and you might get errors and other problems.

The full name of it is Microsoft Date and Time Picker Control 6.0 and it's part of the Microsoft Windows Common Controls-2 6.0 (mscomct2.ocx).

Under Additional Controls you should find it with the first name and when you add choose it there a reference will be added to the 2nd name.

If you goto Additonal Controls... and select Selected Items only you should see it near the top of the list.

If you goto Tools>Reference you should see the reference mentioned above below all the usual references.

Can you take a look and see if you have those things in the downloaded workbook?

PS If you do find them take a note of the path to mscomctl2.ocx

 
Upvote 0
Hi,

Just download DTPicker dll file and paste it in to the following path:-

C:\WINDOWS\system32

and you get the calender in userforms
 
Upvote 0

Forum statistics

Threads
1,224,602
Messages
6,179,841
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top