Link to home
Start Free TrialLog in
Avatar of Andreas Hermle
Andreas HermleFlag for Germany

asked on

Unrestrict restricted scroll area

Dear Experts:

below macro restricts the user to a specific area of a worksheet.

I inserted this sub into the sheet module of the sheet on which I would like to limit the scroll area.

I wonder which code undoes this, i.e. the scroll area is to be 'unrectricted' for the active worksheet.

Help is much appreciated. Thank you very much in advance.

Regards, Andreas


Private Sub Worksheet_Activate()
RestrictUser Range("A1:EO44")
End Sub


Sub RestrictUser(WhichRange As Range)

With WhichRange.Worksheet
.ScrollArea = WhichRange.Areas(1).Address
End With
End Sub

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Rory Archibald
Rory Archibald
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Andreas Hermle

ASKER

Hi rorya:

ok, thank you very much for your quick and professional help.

Regards, Andreas