Multipage error

R

ranswrt

I have a userform with a multipage object on it. On page5 I have a DTPicker.
I set the value of DTPicker on the userform_initialize. If the page5 is on
when the userform is started there isn't a problem. If another page is on
then I get an error on DTPicker1.value=range("biddate"). Also if I close the
userform with another page on than page5 the value that is set from DTpicker
is 0. How is the best way to fix this and also how do I initialize the
userform so that page1 of the multipage is turned on on startup?
Thank You
 
D

Dick Kusleika

I have a userform with a multipage object on it. On page5 I have a DTPicker.
I set the value of DTPicker on the userform_initialize. If the page5 is on
when the userform is started there isn't a problem. If another page is on
then I get an error on DTPicker1.value=range("biddate"). Also if I close the
userform with another page on than page5 the value that is set from DTpicker
is 0. How is the best way to fix this and also how do I initialize the
userform so that page1 of the multipage is turned on on startup?
Thank You

I can confirm that the Date and Time Picker doesn't work on a hidden
Multipage page. You need to make the page active before you set the date.

Private Sub UserForm_Initialize()

Dim lCurrPage As Long

lCurrPage = Me.MultiPage1.Value
Me.MultiPage1.Value = 1
Me.DTPicker1.Day = 1
Me.DTPicker1.Month = 12
Me.DTPicker1.Year = 2007
Me.MultiPage1.Value = lCurrPage

End Sub

Same basic deal to read the value.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top