Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 120
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 120
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 120
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2003 freeze panes won't freeze top row only macbone2002 Excel Discussion (Misc queries) 3 April 22nd 23 02:07 AM
FREEZE PANES mjw Excel Discussion (Misc queries) 1 August 18th 09 05:30 PM
Freeze Panes woody Excel Discussion (Misc queries) 1 May 2nd 08 08:26 PM
Not quite "Freeze Panes"..... chris Excel Discussion (Misc queries) 1 January 25th 05 06:09 PM
Freeze Certain Panes Choice Excel Programming 1 May 9th 04 09:43 PM


All times are GMT +1. The time now is 02:19 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"