LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Date & Time Picker Control 6.0 - another challenge (for me)


Using Excel2007
With Rick Rothstein's code (his post dd 09/10/2008 under "Date & Time Picker
Control 6.0" I managed to get the date picker to pop up on double click and
perform nicely as expected.

Now I wanted to provide the same functionality on a different sheet in the
same workbook. So I copied the code into this sheet but now I get a 424
"Object required" when I click (single or double) in any cell on that sheet;
the debugger stops at the line which I have marked with ==.
The other sheet is still working fine.

This is the code:
'***************** START OF CODE *****************
Dim CurrentDTPickerCell As Range

Private Sub DTPicker1_CloseUp()
CurrentDTPickerCell.Value = DTPicker1.Value
DTPicker1.Visible = False
End Sub

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, _
Cancel As Boolean)
If Not Intersect(Target, Range("B:C")) Is Nothing Then
Cancel = True
Set CurrentDTPickerCell = Target
DTPicker1.Visible = True
DTPicker1.Top = Target.Top
DTPicker1.Left = Target.Left + Target.Width + 1
End If
End Sub

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("B:C")) Is Nothing Then
If DTPicker1.Visible Then DTPicker1.Visible = False
End If
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
== If DTPicker1.Visible Then DTPicker1.Visible = False
End Sub
'***************** END OF CODE *****************
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date & Time Picker Control 6.0 JAD Excel Programming 2 September 10th 08 04:04 PM
date and time picker control Ashku Excel Discussion (Misc queries) 0 July 22nd 06 11:18 AM
date time picker control MacroCharlie Excel Programming 0 November 16th 05 04:01 PM
Problem With Date and Time Picker Control 6.0 Sunnous Excel Discussion (Misc queries) 1 May 27th 05 04:23 PM
Date and Time Picker Control Andy T Excel Discussion (Misc queries) 0 January 6th 05 04:09 PM


All times are GMT +1. The time now is 07:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"