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

I have a MS Calendar Control (DTPicker) in an User Form. How do I modify the properties (value property) from a past date that somehow got in there to a variable that displays current date. I have tried Today and Now but keep getting error msgs when I try to change the "value" property. Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default DT Picker Control

I think it might be: Date() for the value property.

--
Bob Holmes
"Jack_F" wrote in message
...
I have a MS Calendar Control (DTPicker) in an User Form. How do I modify

the properties (value property) from a past date that somehow got in there
to a variable that displays current date. I have tried Today and Now but
keep getting error msgs when I try to change the "value" property. Thanks


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default DT Picker Control

I'm not sure. The only time I've used this control was in an outlook form
and 'Date()' worked.
How about trying GetCurrentDate() or GetCurrentTime()? I don't know if they
will work either.

--
Bob Holmes MCNGP #31
"Jack_F" wrote in message
...
Thanks for the quick reply Bob...

Unfortunately, whenever I tried putting Date() or any variation I could

think of in the Value field of the DTPicker Property box, I still get the
"Invalid Property Value" error.

Is this a Format function requirement?

"Bob Holmes" wrote:

I think it might be: Date() for the value property.

--
Bob Holmes
"Jack_F" wrote in message
...
I have a MS Calendar Control (DTPicker) in an User Form. How do I

modify
the properties (value property) from a past date that somehow got in

there
to a variable that displays current date. I have tried Today and Now but
keep getting error msgs when I try to change the "value" property.

Thanks





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default DT Picker Control

Thanks Bob,
That doesn't seem to work either.

"Bob Holmes" wrote:

I'm not sure. The only time I've used this control was in an outlook form
and 'Date()' worked.
How about trying GetCurrentDate() or GetCurrentTime()? I don't know if they
will work either.

--
Bob Holmes MCNGP #31
"Jack_F" wrote in message
...
Thanks for the quick reply Bob...

Unfortunately, whenever I tried putting Date() or any variation I could

think of in the Value field of the DTPicker Property box, I still get the
"Invalid Property Value" error.

Is this a Format function requirement?

"Bob Holmes" wrote:

I think it might be: Date() for the value property.

--
Bob Holmes
"Jack_F" wrote in message
...
I have a MS Calendar Control (DTPicker) in an User Form. How do I

modify
the properties (value property) from a past date that somehow got in

there
to a variable that displays current date. I have tried Today and Now but
keep getting error msgs when I try to change the "value" property.

Thanks






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 172
Default DT Picker Control

In the UserForm_Initialize Event, where ctlCalendar is the control's
name.

Me!ctlCalendar = Date

HTH
Paul
--------------------------------------------------------------------------------------------------------------
Be advised to back up your WorkBook before attempting to make changes.
--------------------------------------------------------------------------------------------------------------

I have a MS Calendar Control (DTPicker) in an User Form. How do I modify the properties (value property) from a past date that somehow got in there to a variable that displays current date. I have tried Today and Now but keep getting error msgs when I try to change the "value" property. Thanks




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default DT Picker Control

Calendar1.Value = Date()
works for me

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Jack_F" wrote in message
...
Thanks Bob,
That doesn't seem to work either.

"Bob Holmes" wrote:

I'm not sure. The only time I've used this control was in an outlook

form
and 'Date()' worked.
How about trying GetCurrentDate() or GetCurrentTime()? I don't know if

they
will work either.

--
Bob Holmes MCNGP #31
"Jack_F" wrote in message
...
Thanks for the quick reply Bob...

Unfortunately, whenever I tried putting Date() or any variation I

could
think of in the Value field of the DTPicker Property box, I still get

the
"Invalid Property Value" error.

Is this a Format function requirement?

"Bob Holmes" wrote:

I think it might be: Date() for the value property.

--
Bob Holmes
"Jack_F" wrote in message
...
I have a MS Calendar Control (DTPicker) in an User Form. How do I

modify
the properties (value property) from a past date that somehow got in

there
to a variable that displays current date. I have tried Today and Now

but
keep getting error msgs when I try to change the "value" property.

Thanks








  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default DT Picker Control

the past date that you are referring to is the default date value associated with the control. I do not remember the exact property name, but you can adjust that date at design-time (only! I think). Setting the calendar control Value property (at runtime)to the current date and time is undoubtably the Date() function, or any newer function of the equivalent. The only mistakes I can see which might cause you err would be: corrupt ocx, assigning Date() to a variable of the wrong data type and then setting that variable to Value, or the previous mentioned and not including the '#' sign around the date value.


"Jack_F" wrote:

I have a MS Calendar Control (DTPicker) in an User Form. How do I modify the properties (value property) from a past date that somehow got in there to a variable that displays current date. I have tried Today and Now but keep getting error msgs when I try to change the "value" property. Thanks

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
Date picker control Ricardo F Excel Discussion (Misc queries) 2 October 20th 08 03:44 PM
Required Date picker control Vinod[_2_] Excel Discussion (Misc queries) 2 September 20th 08 03:49 PM
date and time picker control Ashku Excel Discussion (Misc queries) 0 July 22nd 06 11:18 AM
Date and Time Picker Control problem Andy Tallent Excel Discussion (Misc queries) 0 May 4th 05 12:50 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 09:47 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"