Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 989
Default date / time picker error

I am using 2 date / time pickers in a userform.

This userform has a multipage with 4 pages (the date / time pickers are on
page 3).

Currently, I have code specifying what value the date/time pickers should go
to by default (the first is set to the first day of the current year and the
second is set to today).

With UserForm1
.DTPicker1.Value = DateSerial(Year(Date), 1, 1)
.DTPicker2.Value = DateSerial(Year(Date), Month(Date), Day(Date))
End With

The code to set the default value is part of the userform_initialize event.
However, when the event runs, I get an error stating "An error occured in a
call of the windows date and time picker control." So, the two controls end
up having values of 1/1/1900.

So, to see what the issue was, I put a button on the userform to update the
date / time picker values using the same exact code as I used in the event
initialize event. This works! However, I can't have users clicking buttons
to update what should be default values.

Any ideas? Is there a multipage select event? Any other way I can have
them automatically update without having the user do the work?
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/Time Picker Obie Excel Programming 10 October 11th 04 11:32 PM
date time picker error KEvin Excel Programming 0 August 22nd 03 06:50 AM
Set Value for Date/Time Picker Bill Lunney Excel Programming 1 July 21st 03 04:29 PM


All times are GMT +1. The time now is 06:04 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"