Can anyone help please?
For those who saw my previous post, this is the continuation and my next problem.
I'm using this macro so the users can return to the project front page when finished and it is working up to the message box.
The bit where I'm stuck is when I try to use the Dim (subpage) to go to the initial page.
As explained on the other post, I'm using "12345W" for front sheet name and then "12345WA1"; "12345WA2"; "12345WA3"; "12345WA4"; "12345WA5"; as subtabs
The subpage = Left(ActiveSheet.Name, 6) code works beautifully and the message box shows exactly what I want ("12345W").
Sub button_click_return()
Dim subpage As String
subpage = Left(ActiveSheet.Name, 6)
MsgBox "Going to project front page:" & subpage
How on Earth I use this bit???
Sheets(ActiveSheet(subpage)).Activate
End Sub
Thank you for your help
PS: almost forgot. this is to be used in the 5 longer name sheets (over 6 Char) and is intended to return to the shorter name page (6 Char).
For those who saw my previous post, this is the continuation and my next problem.
I'm using this macro so the users can return to the project front page when finished and it is working up to the message box.
The bit where I'm stuck is when I try to use the Dim (subpage) to go to the initial page.
As explained on the other post, I'm using "12345W" for front sheet name and then "12345WA1"; "12345WA2"; "12345WA3"; "12345WA4"; "12345WA5"; as subtabs
The subpage = Left(ActiveSheet.Name, 6) code works beautifully and the message box shows exactly what I want ("12345W").
Sub button_click_return()
Dim subpage As String
subpage = Left(ActiveSheet.Name, 6)
MsgBox "Going to project front page:" & subpage
How on Earth I use this bit???
Sheets(ActiveSheet(subpage)).Activate
End Sub
Thank you for your help
PS: almost forgot. this is to be used in the 5 longer name sheets (over 6 Char) and is intended to return to the shorter name page (6 Char).
Last edited: