Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Date Time Picker

Guys,

I have added a calendar control to an Excel 2007 worksheet. I am
trying to pick the selected value in the code section with the
calendar_click() function. I havent been able to pick the date part
from the calendar control. Am I doing something wrong? Is there an
easier way to do this?


Thanks in advance.
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Date Time Picker

Hi Nigel,

I have handled the code this way:

Private Sub Calendar1_Click()
MsgBox Calendar1.Value
Cells(9, 3).Value = Calendar1.Value
Cells(9, 3).NumberFormat = "mm/dd/yyyy"
Cells(9, 3).Select
End Sub

But the msgbox returns a NULL value. So I set the date in the
properties box to today's date - '04/10/2009'. But a change in the
month has no effect in the value of the calendar object. I am not sure
where the disconnect happens!

Thanks,
Haarish.

On Apr 10, 12:31*pm, "Nigel" wrote:
Private Sub Calendar1_Click()
* *Dim calVal
* *calVal = Calendar1.Value
End Sub

--

Regards,
Nigel


"Haarish" wrote in message

...



Guys,


I have added a calendar control to an Excel 2007 worksheet. I am
trying to pick the selected value in the code section with the
calendar_click() function. I havent been able to pick the date part
from the calendar control. Am I doing something wrong? Is there an
easier way to do this?


Thanks in advance.- Hide quoted text -


- Show quoted text -


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Date Time Picker

So we know exactly what control you are using, select the calendar control
on your User Form and, in the Properties window, click the About property
(then the ... button) and tell us what it says the control is. When I used
the "Microsoft Office Access Calendar Control", your code worked perfectly
for me.

--
Rick (MVP - Excel)


"Haarish" wrote in message
...
Hi Nigel,

I have handled the code this way:

Private Sub Calendar1_Click()
MsgBox Calendar1.Value
Cells(9, 3).Value = Calendar1.Value
Cells(9, 3).NumberFormat = "mm/dd/yyyy"
Cells(9, 3).Select
End Sub

But the msgbox returns a NULL value. So I set the date in the
properties box to today's date - '04/10/2009'. But a change in the
month has no effect in the value of the calendar object. I am not sure
where the disconnect happens!

Thanks,
Haarish.

On Apr 10, 12:31 pm, "Nigel" wrote:
Private Sub Calendar1_Click()
Dim calVal
calVal = Calendar1.Value
End Sub

--

Regards,
Nigel


"Haarish" wrote in message

...



Guys,


I have added a calendar control to an Excel 2007 worksheet. I am
trying to pick the selected value in the code section with the
calendar_click() function. I havent been able to pick the date part
from the calendar control. Am I doing something wrong? Is there an
easier way to do this?


Thanks in advance.- Hide quoted text -


- Show quoted text -


Reply
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
pop up Date time picker Mike Excel Discussion (Misc queries) 3 November 17th 06 08:00 PM
Date and Time Picker DAN J Excel Discussion (Misc queries) 2 September 21st 06 11:47 PM
Date and Time Picker Jeff G Excel Programming 4 January 1st 06 01:30 PM
Date/Time Picker Obie Excel Programming 10 October 11th 04 11:32 PM
date time picker chad Excel Programming 1 April 7th 04 06:27 PM


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

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

About Us

"It's about Microsoft Excel"