Thread: Freeze Panes
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Sharad Naik Sharad Naik is offline
external usenet poster
 
Posts: 212
Default Freeze Panes

Below code Freezes Panes at Row1, Coloumn1:

Sub PaneFreezer()
ThisWorkbook.Sheets("Sheet1").Activate
ActiveWindow.FreezePanes = False 'If previously frozen at, unfreeze
first
ThisWorkbook.ActiveSheet.Cells(2, 2).Select
ActiveWindow.FreezePanes = True
End Sub

Sharad
"Rohit" wrote in message
...
How can I freeze panes at runtime?
I am using MS Spreadsheet control. I am using following code to activate
the
cell and freezing the pane
Spreadsheet1.ActiveCell.Offset(3, 4).Select
Spreadsheet1.ActiveWindow.FreezePanes = True

It seems that cell is getting activated and the first cell of the sheet is
(3,4) cell, so freezing pane is not working here.
Please let me know if anybody has any ideas.

Regards,
Rohit Kumar