Thread: Scroll Area
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default 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?