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
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
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
 
Upvote 0
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
 
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,214,375
Messages
6,119,170
Members
448,870
Latest member
max_pedreira

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
Back
Top