Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MultiPage: How to change format for one page? 1

Status
Not open for further replies.

rlee16

Technical User
Jan 19, 2003
44
HK
I have a MultiPage box, with four pages. One of the pages has alot more control boxes and I need more space, so I would like the page to automatically widen when clicking on the Page tab.

Can one use if statements in the Private Sub MultiPage1_change? For instance,

IF MultiPage.Page1.Select Then Formsize(300,400)
ElseIF MultiPage.Page2.Select Then Formsize(300, 600) etc...

In sum
1) How can I format each page in a multipage control?
2) Can a trigger be assigned to the clicking of the Page tab

Regards,
Richard
 
Heigth and width are properties of multipage object, not page. So to adjust page size one should change multipage size.
To get/set active page, use Value property of multipage control. For 1st page is 0, 2nd 1, 3rd 2, etc.

The code can be:

[tt]With MultiPage1
Select Case .Value
Case 0
.Height=100
.Width=300
Case Else
.Height=100
.Width=200
End Select
End With[/tt]
 
Thanks so much! Works perfectly!

Richard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top