#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 28
Default Limit Scrollarea

How can I limit scrollarea say, from A1 to G50 only. i tried the following
macro, press F4 to state Scrollarea to be A1:G50. However, each time after
i've saved and re-open the file, the setting of Scrollarea in the property
(press F4) is gone and therefore the limit scrollarea is not working:

Private Sub Scroll_Area()
Worksheets("Sheet1").ScrollArea = "A1:G50"
End Sub


Please help....

--
exalan
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 220
Default Limit Scrollarea

Just put the following in 'ThisWorkbook':

Private Sub Workbook_Open()
Worksheets("Sheet1").ScrollArea = "A1:G50"
End Sub

--
Dan


On Apr 14, 11:39*am, exalan wrote:
How can I limit scrollarea say, from A1 to G50 only. i tried the following
macro, press F4 to state Scrollarea to be A1:G50. However, each time after
i've saved and re-open the file, the setting of Scrollarea in the property
(press F4) is gone and therefore the limit scrollarea is not working:

Private Sub Scroll_Area()
* * Worksheets("Sheet1").ScrollArea = "A1:G50"
End Sub

Please help....

--
exalan

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 207
Default Limit Scrollarea

why dont you hide all the columns after G and all the rows after 50?

or select H51 and freeze panes?


"exalan" wrote in message
...
How can I limit scrollarea say, from A1 to G50 only. i tried the following
macro, press F4 to state Scrollarea to be A1:G50. However, each time after
i've saved and re-open the file, the setting of Scrollarea in the property
(press F4) is gone and therefore the limit scrollarea is not working:

Private Sub Scroll_Area()
Worksheets("Sheet1").ScrollArea = "A1:G50"
End Sub


Please help....

--
exalan



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,069
Default Limit Scrollarea

The scrollarea method does not persist between sessions, so you will have to
reset it each time you open the workbook. You may wish to place this code
into a WorkBook_Open sub in the ThisWorkbook module:

Private Sub WorkBook_Open()
Sheets("Sheet1").ScrollArea = "A1:G50"
End Sub

Hope this helps,

Hutch

"exalan" wrote:

How can I limit scrollarea say, from A1 to G50 only. i tried the following
macro, press F4 to state Scrollarea to be A1:G50. However, each time after
i've saved and re-open the file, the setting of Scrollarea in the property
(press F4) is gone and therefore the limit scrollarea is not working:

Private Sub Scroll_Area()
Worksheets("Sheet1").ScrollArea = "A1:G50"
End Sub


Please help....

--
exalan

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 28
Default Limit Scrollarea

Thanks for the advice, just that I don't want file user to unfreeze/unhide &
see my detailed computation....
--
exalan


"Gaurav" wrote:

why dont you hide all the columns after G and all the rows after 50?

or select H51 and freeze panes?


"exalan" wrote in message
...
How can I limit scrollarea say, from A1 to G50 only. i tried the following
macro, press F4 to state Scrollarea to be A1:G50. However, each time after
i've saved and re-open the file, the setting of Scrollarea in the property
(press F4) is gone and therefore the limit scrollarea is not working:

Private Sub Scroll_Area()
Worksheets("Sheet1").ScrollArea = "A1:G50"
End Sub


Please help....

--
exalan






  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 28
Default Limit Scrollarea

Hi Gaurav & Hutchins

Thanks for advice. However, tried your method but somehow, it still didn;t
work.
--
exalan


"Tom Hutchins" wrote:

The scrollarea method does not persist between sessions, so you will have to
reset it each time you open the workbook. You may wish to place this code
into a WorkBook_Open sub in the ThisWorkbook module:

Private Sub WorkBook_Open()
Sheets("Sheet1").ScrollArea = "A1:G50"
End Sub

Hope this helps,

Hutch

"exalan" wrote:

How can I limit scrollarea say, from A1 to G50 only. i tried the following
macro, press F4 to state Scrollarea to be A1:G50. However, each time after
i've saved and re-open the file, the setting of Scrollarea in the property
(press F4) is gone and therefore the limit scrollarea is not working:

Private Sub Scroll_Area()
Worksheets("Sheet1").ScrollArea = "A1:G50"
End Sub


Please help....

--
exalan

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 207
Default Limit Scrollarea

well...that can be prevented by protecting the sheet after hiding the
columns/rows.


"exalan" wrote in message
...
Thanks for the advice, just that I don't want file user to unfreeze/unhide
&
see my detailed computation....
--
exalan


"Gaurav" wrote:

why dont you hide all the columns after G and all the rows after 50?

or select H51 and freeze panes?


"exalan" wrote in message
...
How can I limit scrollarea say, from A1 to G50 only. i tried the
following
macro, press F4 to state Scrollarea to be A1:G50. However, each time
after
i've saved and re-open the file, the setting of Scrollarea in the
property
(press F4) is gone and therefore the limit scrollarea is not working:

Private Sub Scroll_Area()
Worksheets("Sheet1").ScrollArea = "A1:G50"
End Sub


Please help....

--
exalan






  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,069
Default Limit Scrollarea

Try this alternate code:

Right-click the name tab of the sheet where the scroll area should be
limited. Select View Code from the menu that pops up. You will be taken to
the Visual Basic Editor (VBE), and the code page for that worksheet will be
displayed. Enter the following code:

Private Sub Worksheet_Activate()
Me.ScrollArea = "A1:G50"
End Sub

Press Alt-Q to leave the VBE. Save your workbook. This code should limit the
scroll area for that sheet only whenever that sheet is activated.

Hutch

"exalan" wrote:

Hi Gaurav & Hutchins

Thanks for advice. However, tried your method but somehow, it still didn;t
work.
--
exalan


"Tom Hutchins" wrote:

The scrollarea method does not persist between sessions, so you will have to
reset it each time you open the workbook. You may wish to place this code
into a WorkBook_Open sub in the ThisWorkbook module:

Private Sub WorkBook_Open()
Sheets("Sheet1").ScrollArea = "A1:G50"
End Sub

Hope this helps,

Hutch

"exalan" wrote:

How can I limit scrollarea say, from A1 to G50 only. i tried the following
macro, press F4 to state Scrollarea to be A1:G50. However, each time after
i've saved and re-open the file, the setting of Scrollarea in the property
(press F4) is gone and therefore the limit scrollarea is not working:

Private Sub Scroll_Area()
Worksheets("Sheet1").ScrollArea = "A1:G50"
End Sub


Please help....

--
exalan

  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Limit Scrollarea

If you don't want users to see your computations, send them a workbook with
static values and the computations bits deleted.

Excel worksheet protection is meant to protect inadvertant erasure of formulas
and stuff.

Not reliable for hiding data from determined users.


Gord Dibben MS Excel MVP

On Mon, 14 Apr 2008 20:07:00 -0700, exalan
wrote:

Thanks for the advice, just that I don't want file user to unfreeze/unhide &
see my detailed computation....


  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 28
Default Limit Scrollarea

Hi Gaurav

Many thanks for the suggestion.
--
exalan


"Gaurav" wrote:

well...that can be prevented by protecting the sheet after hiding the
columns/rows.


"exalan" wrote in message
...
Thanks for the advice, just that I don't want file user to unfreeze/unhide
&
see my detailed computation....
--
exalan


"Gaurav" wrote:

why dont you hide all the columns after G and all the rows after 50?

or select H51 and freeze panes?


"exalan" wrote in message
...
How can I limit scrollarea say, from A1 to G50 only. i tried the
following
macro, press F4 to state Scrollarea to be A1:G50. However, each time
after
i've saved and re-open the file, the setting of Scrollarea in the
property
(press F4) is gone and therefore the limit scrollarea is not working:

Private Sub Scroll_Area()
Worksheets("Sheet1").ScrollArea = "A1:G50"
End Sub


Please help....

--
exalan








  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 28
Default Limit Scrollarea

Hi Tom

Many thanks for the advice...
--
exalan


"Tom Hutchins" wrote:

Try this alternate code:

Right-click the name tab of the sheet where the scroll area should be
limited. Select View Code from the menu that pops up. You will be taken to
the Visual Basic Editor (VBE), and the code page for that worksheet will be
displayed. Enter the following code:

Private Sub Worksheet_Activate()
Me.ScrollArea = "A1:G50"
End Sub

Press Alt-Q to leave the VBE. Save your workbook. This code should limit the
scroll area for that sheet only whenever that sheet is activated.

Hutch

"exalan" wrote:

Hi Gaurav & Hutchins

Thanks for advice. However, tried your method but somehow, it still didn;t
work.
--
exalan


"Tom Hutchins" wrote:

The scrollarea method does not persist between sessions, so you will have to
reset it each time you open the workbook. You may wish to place this code
into a WorkBook_Open sub in the ThisWorkbook module:

Private Sub WorkBook_Open()
Sheets("Sheet1").ScrollArea = "A1:G50"
End Sub

Hope this helps,

Hutch

"exalan" wrote:

How can I limit scrollarea say, from A1 to G50 only. i tried the following
macro, press F4 to state Scrollarea to be A1:G50. However, each time after
i've saved and re-open the file, the setting of Scrollarea in the property
(press F4) is gone and therefore the limit scrollarea is not working:

Private Sub Scroll_Area()
Worksheets("Sheet1").ScrollArea = "A1:G50"
End Sub


Please help....

--
exalan

  #12   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 28
Default Limit Scrollarea

Hi Dan

Many thanks for the advice..
--
exalan


"Dan R." wrote:

Just put the following in 'ThisWorkbook':

Private Sub Workbook_Open()
Worksheets("Sheet1").ScrollArea = "A1:G50"
End Sub

--
Dan


On Apr 14, 11:39 am, exalan wrote:
How can I limit scrollarea say, from A1 to G50 only. i tried the following
macro, press F4 to state Scrollarea to be A1:G50. However, each time after
i've saved and re-open the file, the setting of Scrollarea in the property
(press F4) is gone and therefore the limit scrollarea is not working:

Private Sub Scroll_Area()
Worksheets("Sheet1").ScrollArea = "A1:G50"
End Sub

Please help....

--
exalan


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ScrollArea Kevin Excel Discussion (Misc queries) 2 August 23rd 07 11:21 PM
any limit? p Excel Worksheet Functions 2 November 17th 06 03:13 PM
Scrollarea Doug Excel Discussion (Misc queries) 4 July 14th 06 03:43 PM
64k row limit Jim Excel Worksheet Functions 3 May 3rd 06 09:17 PM
Nested IF limit or Open parentheses limit Fred Excel Discussion (Misc queries) 5 December 23rd 04 03:34 PM


All times are GMT +1. The time now is 09:34 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"