ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Date Picker - "Linked Cell" Property (https://www.excelbanter.com/excel-programming/364008-date-picker-linked-cell-property.html)

skev

Date Picker - "Linked Cell" Property
 

Hi,

I have a task schedule spreadsheet on which I want to place ONE
date/time picker control. I'm looking for some code that will assign
the first empty cell in a column as the picker's linked cell... any
ideas?

Thanks,
skev


--
skev
------------------------------------------------------------------------
skev's Profile: http://www.excelforum.com/member.php...o&userid=35332
View this thread: http://www.excelforum.com/showthread...hreadid=551027


skev[_2_]

Date Picker - "Linked Cell" Property
 

Thanks! I'll give that a shot..

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


skev[_3_]

Date Picker - "Linked Cell" Property
 

Thanks for the info... it seems to be working, accept when I make
selection from the date picker, instead of displaying the date in th
proper cell, Excel displays "#N/A"... then when I select another date
the previously selected date appears in place of "#N/A" in the previou
cell, and "#N/A" is displayed in the current cell... (does that mak
sense?) How can I get the selected date to show up when it's selected
instead of waiting for the next entry?

Thanks again,
ske

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


Bob Phillips

Date Picker - "Linked Cell" Property
 
As I said, I don't uses the Date Picker, but if you tell me which control it
is, where you got it etc., and show your code, I could take a look when I
get a moment.

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"skev" wrote in message
...

Thanks for the info... it seems to be working, accept when I make a
selection from the date picker, instead of displaying the date in the
proper cell, Excel displays "#N/A"... then when I select another date,
the previously selected date appears in place of "#N/A" in the previous
cell, and "#N/A" is displayed in the current cell... (does that make
sense?) How can I get the selected date to show up when it's selected,
instead of waiting for the next entry?

Thanks again,
skev


--
skev
------------------------------------------------------------------------
skev's Profile:

http://www.excelforum.com/member.php...o&userid=35332
View this thread: http://www.excelforum.com/showthread...hreadid=551027




skev[_4_]

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


skev[_5_]

Date Picker - "Linked Cell" Property
 

Also, the time stamp seems to be stuck at 1:34... go figure...


--
skev
------------------------------------------------------------------------
skev's Profile: http://www.excelforum.com/member.php...o&userid=35332
View this thread: http://www.excelforum.com/showthread...hreadid=551027



All times are GMT +1. The time now is 05:39 AM.

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