Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Application.ExecuteExcel4Macro "show.toolbar(""Ribbon"",False)"
Application.DisplayStatusBar = False
If IsNumeric(Sh.Name) Then Sh.ScrollArea = "A1:O31"
End Sub
The above code is presently used to make sure no one is able to scoll outside of a specified area (A1:O31). My workbook has 27 worksheets, of which 26 are numerical. 1 of my worksheets is labeled "Menu", and so the above code is not applying to it. This is okay, initially, because I want to limit ShScrollArea = "A1:M12" on the "Menu" worksheet. How do I modify the above code to accomplish this?
Bookmarks