freeze pane command usage (clarified)

M

mark kubicki

just plain old stuck on this one...

How would I go about freezing the view of my active window at D4, with B2 at
the top left corner of the screen (first visible row, top row = 2, first
visible column, left -most column = col B) ?

clarification:
i'm looking for a way to do this with code, knowing that the active cell
might be anywhere on the sheet (although, after i do all of this "stuff",
the active
cell would be in the "visible range of cells" -lets say: E5...)


as always, thanks in advance,
Mark
 
B

Bob Phillips

Hi Mark,

Try this

Application.Goto reference:=Range("b2"), Scroll:=True
Range("D4").Select
ActiveWindow.FreezePanes = True
Range("E5").Select

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
F

Frank Kabel

Hi
maybe not exactly what you want but try

sub foo()
columns(1).hidden=true
rows(1).hidden=true
Range("D4").Select
ActiveWindow.FreezePanes = True
Range("E5").Select
end sub
 
Top