I have a 2 page MultiPage UserForm. When loaded page 1 shows by defult because that is the one that is on view within the VBA editor.
I know I can change it there so that page 2 would show when the user form loads. But I need page 1 to be the default show and have page 2 show just when the user form is called from one particular procedure. I hope that makes sense!
I have tried the following in both the procedure that calls the user form and also in the userform_initialize procedure:
and:
frmEdCol, MPChart and pgChart are the names of the UserForm, MultiPage and page 2 respectively.
I also tried the same but without the Pages (i.e. MPChart(pgChart)
I am sure there must be a way to get this to work but it eludes me!
Any help or suggestions greatly apreciated.
I know I can change it there so that page 2 would show when the user form loads. But I need page 1 to be the default show and have page 2 show just when the user form is called from one particular procedure. I hope that makes sense!
I have tried the following in both the procedure that calls the user form and also in the userform_initialize procedure:
Code:
frmEdCol.MPChart.Pages(pgChart).SetFocus
Code:
frmEdCol.MPChart.Pages(2).SetFocus
frmEdCol, MPChart and pgChart are the names of the UserForm, MultiPage and page 2 respectively.
I also tried the same but without the Pages (i.e. MPChart(pgChart)
I am sure there must be a way to get this to work but it eludes me!
Any help or suggestions greatly apreciated.