facebook

Articles

VBA - GoTo Sheet* 18/03/2005

Sometimes we have many sheets or sheets with long names & we cannot view them all. You can select which sheet to go to by using this macro.

Sub Go2sheet()
myShts = ActiveWorkbook.Sheets.Count
For i = 1 To myShts
myList = myList & i & " - " & ActiveWorkbook.Sheets(i).Name & " " & vbCr
Next i
Dim mySht As Single
mySht = InputBox("Select sheet to go to." & vbCr & vbCr & myList)
Sheets(mySht).Select
End Sub