'Program Created by Learn More Channel
Sub Enter_Sheet_Number() Dim sheetnum As Integer On Error GoTo ErrorMessage sheetnum = InputBox("Enter Sheet No") If sheetnum > Sheets.Count Then MsgBox "Sheet Not Aviable" Else Sheets(sheetnum).Activate End If ErrorMessage: If Err.Number = 13 Then Err.Clear MsgBox "Invlaid Sheet No" End If End Sub Sub Enter_Sheet_Name() Dim sheetname As String sheetname = InputBox("Enter Sheet Name") On Error GoTo ErrorMessage Sheets(sheetname).Activate ErrorMessage: If Err.Number = 9 Then Err.Clear MsgBox "Invlaid Sheet Name" End If End Sub
No comments:
Post a Comment
THANKS FOR YOUR SUPPORT