Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Freeze Panes
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Freeze Panes
This doesn't work with office XP spreadsheet control
"Sharad Naik" wrote in message ... 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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Freeze Panes
Thanks.
I am facing problem when i try to freeze at specific column (say second row and second column). This works sometimes, but didn't always work. It seems some cell selection problem is there. "Wei-Dong XU [MSFT]" wrote in message ... Hi Rohit, I build one sample page for you. When you click one cell in Spreadsheet can click the "Frees" button, you will find the spreadsheet freezed as the same in Excel. Click "Un Free" button, it will be switched back to the original state. Please feel free to let me know if you have any question. Best Regards, Wei-Dong XU (WD) Microsoft Product Support Services Get Secure! - www.microsoft.com/security This posting is provided "AS IS" with no warranties, and confers no rights. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Freeze Panes
Hi Rohit,
For this scenario, I'd suggest you can add this two lines of code into the SetFrees method of my sample. oss.WorkSheets("Sheet1").Activate(); oss.ActiveSheet.Range("B3").Cells.Select(); This method should be: function SetFrees() { oss.WorkSheets("Sheet1").Activate(); oss.ActiveSheet.Range("B3").Cells.Select(); oss.ActiveWindow.FreezePanes = true; } Before we set the freezePanes at the worksheet, we can select the cell and the FreePanels will be set to Row 2 and Col2. If your issue remains, could you be so kind to build one repro page for me so that I can research this issue then? Thanks in advance! You can email me the file or attached it in this thread (please zip the file). My email account is: (please remove the online from the email, which avoids spam) Please feel free to let me know if you have any question. Best Regards, Wei-Dong XU (WD) Microsoft Product Support Services Get Secure! - www.microsoft.com/security This posting is provided "AS IS" with no warranties, and confers no rights. |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Freeze Panes
Rohit, try to unfreeze first and then write your code to freeze again. S first step is unfreeze, then select required cell, and then freeze. The reason could be that the cell you are trying to select is hidde away because of an existing freeze -- mangesh_yada ----------------------------------------------------------------------- mangesh_yadav's Profile: http://www.excelforum.com/member.php...fo&userid=1047 View this thread: http://www.excelforum.com/showthread.php?threadid=27895 |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Freeze Panes
Hi Rohit,
I have tested your page. After rendering, the page freezePanels are set successfully. My IE is 6.0.3790.0 (windows 2003 enterprise). What is your IE version and the OS? Thanks in advance! Please ensure that you have installed all the latest patches via Windows Update. For your scenario, I'd suggest you can set one Timer to execute the SetFrees after 500 millisecond after the rendering, which may be one workaround. Change the code below from: //--------------- var oss = document.all.ss; SetFrees(); function SetNoFrees() to var oss = document.all.ss; window.setTimeout("SetFrees()", 500); function SetNoFrees() //--------------- Look forward to your reply! Best Regards, Wei-Dong XU (WD) Microsoft Product Support Services Get Secure! - www.microsoft.com/security This posting is provided "AS IS" with no warranties, and confers no rights. |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Freeze Panes
Thanks a lot. It works after setting the timer.
My IE version is 6.0.2800.1106. Without seting timer, it was not freezing sometimes. Thanks, Rohit Kumar "Wei-Dong XU [MSFT]" wrote in message ... Hi Rohit, I have tested your page. After rendering, the page freezePanels are set successfully. My IE is 6.0.3790.0 (windows 2003 enterprise). What is your IE version and the OS? Thanks in advance! Please ensure that you have installed all the latest patches via Windows Update. For your scenario, I'd suggest you can set one Timer to execute the SetFrees after 500 millisecond after the rendering, which may be one workaround. Change the code below from: //--------------- var oss = document.all.ss; SetFrees(); function SetNoFrees() to var oss = document.all.ss; window.setTimeout("SetFrees()", 500); function SetNoFrees() //--------------- Look forward to your reply! Best Regards, Wei-Dong XU (WD) Microsoft Product Support Services Get Secure! - www.microsoft.com/security This posting is provided "AS IS" with no warranties, and confers no rights. |
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
Freeze Panes
You are welcome! :0) Best Regards, Wei-Dong XU (WD) Microsoft Product Support Services Get Secure! - www.microsoft.com/security This posting is provided "AS IS" with no warranties, and confers no rights. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2003 freeze panes won't freeze top row only | Excel Discussion (Misc queries) | |||
FREEZE PANES | Excel Discussion (Misc queries) | |||
Freeze Panes | Excel Discussion (Misc queries) | |||
Not quite "Freeze Panes"..... | Excel Discussion (Misc queries) | |||
Freeze Certain Panes | Excel Programming |