View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default Change properties of a multipage

I ran similarly from a button on a multipage and it worked absolutely fine.
Even if the button is on the page-4 it can at least make itself not visible.

Try this, in your commandbutton's click event

Private Sub CommandButton1_Click()
With Me.MultiPage1.Pages(3)
.Visible = Not .Visible
Me.Caption = UserForm1.MultiPage1.Pages(3).Visible
Me.Caption = .Name & " visible=" & .Visible
End With
End Sub

Regards,
Peter T


"Oscar" wrote in message
...


Thanks Peter

The code you sent works fine when I click the user form. I like the
toggle idea.

I would however like to activate the code from a command button that is
on one of the multipages. I have used the code

frmMenu.Multipage1.Pages(3).visible =false

or by modifying your code as follows

With frmMenu.Multipage1.Pages(3)
visible = not.visible

For some reason it does not seem to identify the page to change the
visible property.

Any thoughts
Thanks again for your help so far!

*** Sent via Developersdex http://www.developersdex.com ***