ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   freeze pane command usage (clarified) (https://www.excelbanter.com/excel-programming/293596-freeze-pane-command-usage-clarified.html)

Mark Kubicki

freeze pane command usage (clarified)
 
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



Bob Phillips[_6_]

freeze pane command usage (clarified)
 
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)

"mark kubicki" wrote in message
...
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





Frank Kabel

freeze pane command usage (clarified)
 
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

--
Regards
Frank Kabel
Frankfurt, Germany

mark kubicki wrote:
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




All times are GMT +1. The time now is 01:18 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com