Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Scroll Area
Is there any way of setting the scroll area of a spread sheet ie: using the
..scrollarea = function in VB where the scroll area may not be known at the time of writing the vb code. Instead of using activesheet.scrollarea = "a1:p34" I want to use activesheet.scrollarea = range1 : where range1 has been determined Can this be done? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Scroll Area
instead use:
ActiveSheet.ScrollArea = "range1" and to remove ActiveSheet.ScrollArea = "" --- HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm Search Page: http://www.mvps.org/dmcritchie/excel/search.htm "Ashman" wrote in message ... Is there any way of setting the scroll area of a spread sheet ie: using the .scrollarea = function in VB where the scroll area may not be known at the time of writing the vb code. Instead of using activesheet.scrollarea = "a1:p34" I want to use activesheet.scrollarea = range1 : where range1 has been determined Can this be done? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Scroll Area
Hi Ashman
You can use this Set rng = Range("A4:E10") ActiveSheet.ScrollArea = rng.Address Or Set rng = Range("A1").CurrentRegion ActiveSheet.ScrollArea = rng.Address -- Regards Ron de Bruin http://www.rondebruin.nl "Ashman" wrote in message ... Is there any way of setting the scroll area of a spread sheet ie: using the .scrollarea = function in VB where the scroll area may not be known at the time of writing the vb code. Instead of using activesheet.scrollarea = "a1:p34" I want to use activesheet.scrollarea = range1 : where range1 has been determined Can this be done? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Scroll Area
A better example: This will toggle between range1 as scroll area
and removing the scroll area limitations on mouse, arrow keys, scrolling, etc. Private Sub Worksheet_BeforeRightClick(ByVal Target _ As Range, Cancel As Boolean) Cancel = True If ActiveSheet.ScrollArea = "" Then ActiveSheet.ScrollArea = "range1" Else ActiveSheet.ScrollArea = "" End If End Sub --- HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm Search Page: http://www.mvps.org/dmcritchie/excel/search.htm |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Restricting Scroll Area | Excel Discussion (Misc queries) | |||
Scroll Area | Excel Discussion (Misc queries) | |||
Worksheet scroll area | Excel Discussion (Misc queries) | |||
how to set scroll area | Excel Programming | |||
Scroll Area for Data | Excel Programming |