ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Multipage dialogbox (https://www.excelbanter.com/excel-programming/401323-multipage-dialogbox.html)

Patrick C. Simonds

Multipage dialogbox
 
Wondering two things:

1. What do I need to put in my UserForm_Initialize() subroutine to always
open the UserForm with the Welcome tab active?

2 What code would I need to go to a particular Worksheet when I click on a
Tab. So if I were to click on the "Wire Marking" tab of the MultiPage
Dialogbox the Wire Marking worksheet would be active?


Incidental

Multipage dialogbox
 
Hi Patrick

The code below would be one way of doing it

Option Explicit
Dim MyStr As String

Private Sub MultiPage1_Change()

With MultiPage1
MyStr = .Pages(.Value).Caption
End With

With ActiveWorkbook
.Sheets(MyStr).Select
End With

End Sub

Hope this helps

Steve


RB Smissaert

Multipage dialogbox
 
1.
Form1.Multipage.Value = 3 'or whatever value, note first page has value 0

2.
Private Sub MultiPage1_Change()

Select Case MultiPage1.Value
Case 0
Case 1
Case 2
Case 3
Sheets("Wire Marking ").Activate
End Select

End Sub


RBS

"Patrick C. Simonds" wrote in message
...
Wondering two things:

1. What do I need to put in my UserForm_Initialize() subroutine to always
open the UserForm with the Welcome tab active?

2 What code would I need to go to a particular Worksheet when I click on
a Tab. So if I were to click on the "Wire Marking" tab of the
MultiPage Dialogbox the Wire Marking worksheet would be active?




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

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