Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / May 2008

Tip: Looking for answers? Try searching our database.

scroll lock

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
moiz - 10 May 2008 10:39 GMT
Hi,
I am trying to lock the scroll, My range is "a1:ar31",  When i save and
close the work sheet and open again the scroll lock range dissappears. is
there any code???. please help. Thanks in advance.
moiz
Sandy - 10 May 2008 13:46 GMT
Hi Moiz

In the 'This Workbook' module :-

Sub Workbook_Open()

   Sheets("YourSheetName").ScrollArea = "A1:AR31"

End Sub

Sandy

> Hi,
> I am trying to lock the scroll, My range is "a1:ar31",  When i save and
> close the work sheet and open again the scroll lock range dissappears. is
> there any code???. please help. Thanks in advance.
> moiz
moiz - 10 May 2008 14:40 GMT
Thank u Sandy,
I copied the code and Even in properties of sheet1 scroll area i wrote the
range to lock but to my surprise when i save and exit and restart Excel the
code is there but the scrolling is not locked. where i am going wrong, please
help.

> Hi Moiz
>
[quoted text clipped - 13 lines]
> > there any code???. please help. Thanks in advance.
> > moiz
Sandy - 10 May 2008 15:00 GMT
Hi Moiz

Did you put the code in the "This Workbook" module?
If you placed it in the Sheet1 module it will not work.

Setting the ScrollArea in properties will not save.

Sandy

> Thank u Sandy,
> I copied the code and Even in properties of sheet1 scroll area i wrote the
[quoted text clipped - 22 lines]
>> > there any code???. please help. Thanks in advance.
>> > moiz
moiz - 10 May 2008 15:22 GMT
Yes i put in the "This workbook" module. its so strange.
thanks

> Hi Moiz
>
[quoted text clipped - 31 lines]
> >> > there any code???. please help. Thanks in advance.
> >> > moiz
Sandy - 10 May 2008 15:29 GMT
And macros are enabled?

> Yes i put in the "This workbook" module. its so strange.
> thanks
[quoted text clipped - 37 lines]
>> >> > there any code???. please help. Thanks in advance.
>> >> > moiz
moiz - 10 May 2008 15:36 GMT
Thank u Sandy,
I did a mistake, thanks a lot, the code also was in sheet module as well in
workbook module. now its working fine once again thank u very much. i have
one more doubt. how to add more scrolling lock for other sheets too????

> And macros are enabled?
>
[quoted text clipped - 39 lines]
> >> >> > there any code???. please help. Thanks in advance.
> >> >> > moiz
Sandy - 10 May 2008 16:07 GMT
To the code already in the 'This Workbook' module, just add the other sheets
as example below

Sub Workbook_Open()

   Sheets("YourSheetName").ScrollArea = "A1:AR31"

    Sheets("YourSheetNameA").ScrollArea = "A1:AR31"
    Sheets("YourSheetNameB").ScrollArea = "A1:AR31"
    Sheets("YourSheetNameC").ScrollArea = "A1:AR31"

End Sub

HTH
Sandy

> Thank u Sandy,
> I did a mistake, thanks a lot, the code also was in sheet module as well
[quoted text clipped - 49 lines]
>> >> >> > there any code???. please help. Thanks in advance.
>> >> >> > moiz
moiz - 10 May 2008 17:02 GMT
Thanks Sandy.....Thanks once again.
moiz

> To the code already in the 'This Workbook' module, just add the other sheets
> as example below
[quoted text clipped - 65 lines]
> >> >> >> > there any code???. please help. Thanks in advance.
> >> >> >> > moiz
Gord Dibben - 10 May 2008 19:24 GMT
If you want all sheets to have the same scrollarea you can have one set of code
in Thisworkbook module.

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
ActiveSheet.ScrollArea = "A1:AR31"
End Sub

Gord Dibben  MS Excel MVP

>Thank u Sandy,
>I did a mistake, thanks a lot, the code also was in sheet module as well in
[quoted text clipped - 44 lines]
>> >> >> > there any code???. please help. Thanks in advance.
>> >> >> > moiz
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.