Better2BurnOut
New Member
- Joined
- Jul 4, 2017
- Messages
- 2
Hi,
I've created a multipage UserForm with 10 pages and am in the process of adding "Back" and "Next" buttons to the form. I've searched through the forums and tried both methods of 1) Enabling and 2) Visibility of the pages to achieve what I want. Unfortunately, with both methods, when I click on the "Next" button, the page is blank and I cannot see any of the controls on the page (text boxes, combo boxes, etc.); I can only see the tab title. I have to click once more on the tab title before the controls are loaded and visible. This problem only occurs when I am cycling forward through the tabs clicking on the "Next" buttons, it doesn't happen when I click on a "Back" button. Irrespective of whether I use .Visible or .Enabled, I still get the same overall issue.
Example (with only three pages):
I've created a multipage UserForm with 10 pages and am in the process of adding "Back" and "Next" buttons to the form. I've searched through the forums and tried both methods of 1) Enabling and 2) Visibility of the pages to achieve what I want. Unfortunately, with both methods, when I click on the "Next" button, the page is blank and I cannot see any of the controls on the page (text boxes, combo boxes, etc.); I can only see the tab title. I have to click once more on the tab title before the controls are loaded and visible. This problem only occurs when I am cycling forward through the tabs clicking on the "Next" buttons, it doesn't happen when I click on a "Back" button. Irrespective of whether I use .Visible or .Enabled, I still get the same overall issue.
Example (with only three pages):
Code:
Private Sub UserForm_Initialize()
Me.MultiPage1.Pages("Page1").Visible = True
Me.MultiPage1.Pages("Page2").Visible = False
Me.MultiPage1.Pages("Page3").Visible = False
End Sub
Private Sub CBtnNext1_Click()
Me.MultiPage1.Pages("Page1").Visible = False
Me.MultiPage1.Pages("Page2").Visible = True
Me.MultiPage1.Pages("Page3").Visible = False
End Sub
Private Sub CBtnBack1_Click()
Me.MultiPage1.Pages("Page1").Visible = True
Me.MultiPage1.Pages("Page2").Visible = False
Me.MultiPage1.Pages("Page3").Visible = False
End Sub