Calling Userform to specific tab (page)?

BAlGaInTl

Well-known Member
Joined
May 7, 2003
Messages
1,082
Hey all...

I have a userform with multiple tabs (pages). Is there a way that I can call the userform and have it load displaying a tab other than the default tab?

Any help is appreciated.

TIA
 

Some videos you may like

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

Haluk

Rules Violation
Joined
Oct 26, 2002
Messages
1,075
The following code, activates the 2nd page of the MultiPage when the UserForm initializes;

Code:
Private Sub UserForm_Initialize()
MultiPage1.Value = 1
End Sub


Similarly you can decide on which page to be activated when the UserForm is initialized by;

Inserting the following to the UserForm code module:

Code:
Private Sub UserForm_Initialize()
MultiPage1.Value = MyPage
End Sub

And inserting the following in a standart code module, where the page index is declared as a public variable;

Code:
Public MyPage As Integer
'
Sub CallForm()
MyPage = 1
UserForm1.Show
End Sub
 

BAlGaInTl

Well-known Member
Joined
May 7, 2003
Messages
1,082
Raider said:
The following code, activates the 2nd page of the MultiPage when the UserForm initializes;

Code:
Private Sub UserForm_Initialize()
MultiPage1.Value = 1
End Sub

The form is rather long, and 90% of the time, the user will start with the first page.

I would rather not have to re-initialize the entire form just to get the 3rd page to show automatically.

Is there a way to use

DataEntry.Show

in some fashion? If not, maybe I will just tell the lazy users to click on the proper tab themselves when the form loads. :D
 

Haluk

Rules Violation
Joined
Oct 26, 2002
Messages
1,075
By changing the UserForm and related object names (or the page index which is stored in the public variable, Mypage) , the solutions given above should do the trick.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,368
Messages
5,595,755
Members
414,017
Latest member
surajks

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top