August 25, 2017
I am trying to adjust my macro (listed below). I would like for it to go to a specific sheet when I enter the name. However, when I enter a numeric title (i.e, 16R) it seems to go to sheet 16. Can you tell me how to fix the problem? Thanks
' Macro2 Macro
Dim sSheet As String
sSheet = InputBox( _
Prompt:="Sheet name or number?", _
On Error GoTo noSheet
If Val(sSheet) > 0 Then
'Enter your code to display a warning that the sheet does not exist
'and/or bring up a selection box of all sheets
MsgBox "Sheet not found."
June 25, 2016
Try changing this line of codes
If IsNumeric(sSheet) Then
I suggest you don't use the sheet number as it can be very confusing. Use only the sheet's name instead.
I have attached an example of one that I did for another member some time ago.
Hope this helps.