View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
skev[_4_] skev[_4_] is offline
external usenet poster
 
Posts: 1
Default Date Picker - "Linked Cell" Property


It's the "Microsoft Date and Time Picker Control 6.0 (SP6)"... (Found i
the standard VBA toolbox).
It supports the following events:

CallbackKeyDown
Change
Click
CloseUp
DblClick
DropDown
Format
FormatSize
GotFocus
KeyDown
KeyPress
KeyUp
LostFocus
MouseDown
MouseMove
MouseUp
OLECompleteDrag
OLEDragDrop
OLEDragOver
OLEGiveFeedback
OLESetData
OLEStartDrag

My code uses the DropDown event, as follows:

Private Sub DTPicker1_DropDown()
DTPicker1.LinkedCell = "B" & Range("B4").End(xlDown).Row + 1
End Sub

( ...this works fine for incrementing the destination cell... )

Some poking around revealed that the "CheckBox" property for th
control, (which needs to be set to True in order to use th
"LinkedCell" property), gets set to false when a date is selected fro
the popup calendar... clicking on the checkbox displays the selecte
date.

This is too much interaction... the date should simply show up. So
used the LostFocus event to reset the "CheckBox" value, as follows:

Private Sub DTPicker1_LostFocus()
DTPicker1.CheckBox = True
End Sub

Also tried the "Change" event with this code, but to no avail.

(_8(|)

D'OH!!

--
ske
-----------------------------------------------------------------------
skev's Profile: http://www.excelforum.com/member.php...fo&userid=3533
View this thread: http://www.excelforum.com/showthread.php?threadid=55102