Microsoft Date and Time Picker Control

O

oldgrowth

I have an excel worksheet with "Microsoft Date and Time Picker Control". I want the value (date) in the Picker Control to be used in another cell in the worksheet. Anyone know how to accomplish this

Thank yo
Dav
oldgrowth(at)msn(dot)co
 
B

Bob Phillips

Dave,

This is a reprint of a post from Ron de Bruin last year on this subject

==============================================

Do Insert-Object from the menubar and place a calendar control on your
sheet.

If you select a cell in Column A the calendar will popup and when
you DblClick on the calendar the date will be placed in the activecell

Place this in a Sheetmodule

Private Sub Calendar1_DblClick()
ActiveCell.NumberFormat = "m/d/yyyy"
ActiveCell = Calendar1
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 1 Then
Calendar1.Left = Target.Left + Target.Width - Calendar1.Width
Calendar1.Top = Target.Top + Target.Height
Calendar1.Visible = True
Else: Calendar1.Visible = False
End If
End Sub


Or this Example for one cell

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$A$1" Then
Calendar1.Left = Target.Left + Target.Width - Calendar1.Width
Calendar1.Top = Target.Top + Target.Height
Calendar1.Visible = True
Else: Calendar1.Visible = False
End If
End Sub


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

oldgrowth said:
I have an excel worksheet with "Microsoft Date and Time Picker Control".
I want the value (date) in the Picker Control to be used in another cell in
the worksheet. Anyone know how to accomplish this?
 
B

Bob Phillips

Ron,

Does that essentially reflect that post from last May?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
R

Ron de Bruin

Hi Bob

There is also a link on the bottom to a website with a good example for making a Userform with the control on it.
Also you can download the control on this website.
All MS links are dead for downloading the control.

Greetings from the Netherlands
 
B

Bob Phillips

Ron,

I saw those links on the original post, but as the OP already had the
control on the worksheet he clearly didn't need to download it<vbg>

I'll note the page for the future.

All the best

Bob

Ron de Bruin said:
Hi Bob

There is also a link on the bottom to a website with a good example for
making a Userform with the control on it.
 

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

Top