View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
EricG EricG is offline
external usenet poster
 
Posts: 220
Default Date Picker on Multipage

Actually, I placed the DTP on the second page of a multi-page control on a
user form, and the code I supplied you worked perfectly. Not sure why yours
won't work, but mine did.

It also works this way:

Me.MultiPage1.Pages("Page2").DTPicker1.Year = 2009
Me.MultiPage1.Pages("Page2").DTPicker1.Month = 7
Me.MultiPage1.Pages("Page2").DTPicker1.Day = 1



Eric

"Shawn" wrote:

This does not work on a multipage on a userform - sorry if I was not clear on
that.
A userform with a multipage that has a date picker in it.

"EricG" wrote:

This worked for me:

Me.DTPicker1.Year = Year(Date)
Me.DTPicker1.Month = Month(Date)
Me.DTPicker1.Day = Day(Date)

HTH,

Eric

"Shawn" wrote:

Sorry needed to correct first post

How do I access a Date picker on a Multipage?
I want to assign it a value.
I have tried

frmTMF.MultiPage1.DTPickerReviewDate.Value = Date
and
frmTMF.DTPickerReviewDate.Value = Date

first returns error 438 - Object doesn't support this property or method
second returns error 35788 - An error occured in a call to the windows date
and time picker control