Robb or anyone, again :)


Posted by RoB on August 15, 2001 5:09 PM

This is again in regards to the workspace problem. I go the outline and headers to hide now, but I've got another problem. I save the sheet with the first row frozen. But, when I open this file in a workspace, it erases my frozen pane. Is there a way to prevent this, or freeze the first row with the macro?
Thanks :)

Posted by Robb on August 15, 2001 5:27 PM

Rob

Just set the FreezePane to True for each sheet. You need to position the activecell first so, presuming you want the whole of Row 1 frozen, your code would look something like:

For Each s In Workbooks("book2.xls").Sheets
s.Activate
Range("a2").Select 'Sets the freezepane
s.Outline.ShowLevels rowlevels:=1
ActiveWindow.DisplayOutline = False
ActiveWindow.FreezePanes = True 'Freezes the pane
Next s

Does this do it?



Posted by RoB on August 16, 2001 11:20 AM

Works Great! thanks so much