Scroll Lock for selected multiple sheets

  • Thread starter Thread starter Keyrookie
  • Start date Start date
K

Keyrookie

Help please,

I'm trying to limit the scroll area of several sheets but I also need
other sheets to scroll normally. I'm using this formula in the VBA
(ThisWorkbook):

Private Sub WorkBook_Open()
Sheets("Jan").ScrollArea = "A1:M52"
End Sub

This works fine for the "Jan" sheet but I have several others that I
need to limit the scroll area as well. I tried placing the above
formula in each sheet that I want to limit but upon opening the
workbook I get an Runtime Error.

What's the solution?

K
 
This code goes in the ThisWorkbook module--not behind each worksheet.

Private Sub WorkBook_Open()
Sheets("Jan").ScrollArea = "A1:M52"
sheets("Feb").scrollarea = "a12:q34")
sheets("Mar").scrollarea = "x99:z108")
'...etc
End Sub
 
Dave said:
This code goes in the ThisWorkbook module--not behind each worksheet.

Private Sub WorkBook_Open()
Sheets("Jan").ScrollArea = "A1:M52"
sheets("Feb").scrollarea = "a12:q34")
sheets("Mar").scrollarea = "x99:z108")
'...etc
End Sub

Keyrookie wrote:-

Thank you Dave, that did the job. You're the MAN!
 
Back
Top