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

Thank you very much for your help! I was able to use what you all gave me to
finally get an answer. I failed to mention was that it was a DTPicker in a
multipage in a multipage ;( - hence nothing worked like it should have.

So using what you all had said I got it to work with this

Dim ctrl As msforms.Control
Dim col As Integer ' this is set elsewhere
Dim dDate As String

For Each ctrl In .Controls
If TypeName(ctrl) = "DTPicker" Then
With ctrl
Select Case (ctrl.Name)
Case ("DTPickerDate")
dDate = Cells(53, col).Value
frm.MultiPage1.Value = 3
frm.MultiPage2.Value = 0
If frm.MultiPage2.Pages("Page1").Visible = True
Then
.Value = dDate
End If
Case ("DTPickerTestDate")
dDate = Cells(61, col).Value
frm.MultiPage1.Value = 3
frm.MultiPage2.Value = 1
If frm.MultiPage2.Pages("Page2").Visible = True
Then
.Value = dDate
End If
Case Else
End Select
End With
End If
Next
End With

Thank you again - maybe this will help someone else aswell.


"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