ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Default multi page (https://www.excelbanter.com/excel-programming/427061-default-multi-page.html)

Bill

Default multi page
 
Have read the other Q&A's on default multipage and still cant get it to work
Want to open on page 0, on open, here is code

Workbook opens and immediatly displays user form

Private Sub workbook_open()

MsgBox "Agree to confidentiality message"
Mymain.Show
'need to default to page 0 the first page
'mymain is name of user form
Mymain.MultiPage1.Value = 0
Mymain.MultiPage1.Pages(1).Visible = True

End Sub

Thanks in advance from australia


Bill

Default multi page
 
Perfect, when in doubt step through your code, Thanks, Bill

"OssieMac" wrote:


Set the Multipage value first before opening form

Mymain.MultiPage1.Value = 0 'Where zero is page1, 1 is Page 2 etc
Mymain.Show

--
Regards,

OssieMac


"Bill" wrote:

Have read the other Q&A's on default multipage and still cant get it to work
Want to open on page 0, on open, here is code

Workbook opens and immediatly displays user form

Private Sub workbook_open()

MsgBox "Agree to confidentiality message"
Mymain.Show
'need to default to page 0 the first page
'mymain is name of user form
Mymain.MultiPage1.Value = 0
Mymain.MultiPage1.Pages(1).Visible = True

End Sub

Thanks in advance from australia


OssieMac

Default multi page
 
Hi again Bill,

Just a little extra info on the ShowModal property of a form. When set to
True, no code runs after the Show command until the form is closed. Also you
cannot access worksheets while the form is open.

If ShowModal is set to False then all the code runs and you can also access
cells on worksheets etc while the form is open.

ShowModal cannot be set with VBA code; only in the Properties dialog box.

--
Regards,

OssieMac


"Bill" wrote:

Perfect, when in doubt step through your code, Thanks, Bill

"OssieMac" wrote:


Set the Multipage value first before opening form

Mymain.MultiPage1.Value = 0 'Where zero is page1, 1 is Page 2 etc
Mymain.Show

--
Regards,

OssieMac


"Bill" wrote:

Have read the other Q&A's on default multipage and still cant get it to work
Want to open on page 0, on open, here is code

Workbook opens and immediatly displays user form

Private Sub workbook_open()

MsgBox "Agree to confidentiality message"
Mymain.Show
'need to default to page 0 the first page
'mymain is name of user form
Mymain.MultiPage1.Value = 0
Mymain.MultiPage1.Pages(1).Visible = True

End Sub

Thanks in advance from australia



All times are GMT +1. The time now is 06:36 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com