• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

scroll area

kalpeshpatel

New Member
l would like to lock scroll area in sheet1 in range A1:H10 when sheet 1 i activate

the code is given under


Sub LockArea()

Worksheets(1).ScrollArea = "A1:F10"

End Sub


Private Sub Worksheet_Activate()

Call LockArea

End Sub


but problem is when file is close & again open this file scroll area is unlock so i first select sheet2 & then select sheet1 then scroll area is lock


i like when every time file is open the sheet 1 scroll area is lock whithout select sheet2


how
 
Hi Kalpesh ,


Put the following code in the ThisWorkBook section of your VBA Project :

[pre]
Code:
Private Sub Workbook_Open()
Worksheets(1).ScrollArea = "A1:F10"
End Sub
[/pre]

Narayan
 
Back
Top