ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Date Picker Control (https://www.excelbanter.com/excel-programming/431096-date-picker-control.html)

Sam

Date Picker Control
 
I have had trouble utilizing the Calendar control when the end user does not
have Access installed on their PC. Does the Date Picker control have the same
limitation?It's difficult to test since I do have Access in my Office bundle.

Thanks,

Sam

Jacob Skaria

Date Picker Control
 
DatePicker comes along with Visual Studio; which again may not be in the user
machine.

If this post helps click Yes
---------------
Jacob Skaria


"Sam" wrote:

I have had trouble utilizing the Calendar control when the end user does not
have Access installed on their PC. Does the Date Picker control have the same
limitation?It's difficult to test since I do have Access in my Office bundle.

Thanks,

Sam


Jacob Skaria

Date Picker Control
 
Sam, you can try a custom date/time picker such as below. Try this out using
a textbox control in a userform.

Private Sub UserForm_Activate()
Me.TextBox1 = Format(Now, "dd-mmm-yyyy hh:mm")
End Sub

Private Sub TextBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal
Shift As Integer)
'Date and Time Picker Use down/up arrow to change date/time.
Dim intPos As Integer, strType As String
If KeyCode = 38 Or KeyCode = 40 Then
intPos = Me.TextBox1.SelStart
strType = Application.Lookup(intPos, _
Array(0, 3, 7, 12, 15), Array("d", "m", "yyyy", "h", "n"))
Me.TextBox1 = Format(DateAdd(strType, _
(39 - KeyCode), TextBox1), "dd-mmm-yyyy hh:mm")
KeyCode = 0
Me.TextBox1.SelStart = intPos
End If
End Sub


If this post helps click Yes
---------------
Jacob Skaria


"Sam" wrote:

I have had trouble utilizing the Calendar control when the end user does not
have Access installed on their PC. Does the Date Picker control have the same
limitation?It's difficult to test since I do have Access in my Office bundle.

Thanks,

Sam


Lemi

Date Picker Control
 
Hi Sam,

I had the same problem and solved as follows:

-You need to find MSCOMCT2.OCX file
-Copy it under Windows\System32 if it is not already there
-Manually register it by Run under Start menu, writing:
regsvr32 MSCOMCT2.OCX and click OK
-You should see the message something like "...successfuly registered"

When you open the Excel next time you should be able to find DatePicker
controls under Additional Controls.

See if this helps.

Rgds,
Lemi

"Sam" wrote in message
...
I have had trouble utilizing the Calendar control when the end user does
not
have Access installed on their PC. Does the Date Picker control have the
same
limitation?It's difficult to test since I do have Access in my Office
bundle.

Thanks,

Sam





All times are GMT +1. The time now is 11:49 AM.

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