News Focus
News Focus
Followers 39
Posts 10609
Boards Moderated 1
Alias Born 07/08/2003

Re: hk2 post# 26268

Monday, 01/31/2005 12:00:14 PM

Monday, January 31, 2005 12:00:14 PM

Post# of 37180
hk2: to operate on a given a sheet, it must have the focus.
so you need to add a "sht.Select" or "sht.Activate" before attempting to freeze the row

Change:
For Each sht In ActiveWorkbook.Worksheets 
sht.Range("A2").Select
sht.Range("A2").Activate
ActiveWindow.FreezePanes = True
Next sht


To:
For Each sht In ActiveWorkbook.Worksheets 
Sht.Select 'COMMENT: can also use Sht.Activate here
sht.Range("A2").Activate
ActiveWindow.FreezePanes = True
Next sht









Discover What Traders Are Watching

Explore small cap ideas before they hit the headlines.

Join Today