multipage form

G

Guest

I have a 5 page multipage form and I want to in some cases hide certain pages
and some cases make all of the controls on a given page read only.

Thanks
 
G

Guest

the code below is a rough guide. I have put four buttons onto a form with a
multipage object with 5 tabs ( 0 - 4 )
tab 2 ( the third tab) has an edit box as its only control, ie item 0 in the
controls collection
The buttons hide & show the third tab, and enable/disable the editbox

Private Sub cmdDisableEditBox_Click()
With MultiPage1.Pages(2).Controls
.Item(0).Enabled = False
End With
End Sub

Private Sub cmdEnableEditBox_Click()
With MultiPage1.Pages(2).Controls
.Item(0).Enabled = True
End With
End Sub

Private Sub cmdHideTab3_Click()
MultiPage1.Pages(2).Visible = False
End Sub

Private Sub cmdShowTab3_Click()
MultiPage1.Pages(2).Visible = True
End Sub

HTH

Patrick Molloy
Microsoft Excel MVP
 

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

Similar Threads


Top