Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default FreezePanes from VBA?

Greetings! Not understanding what I'm seeing. I'm creating an Excel
workbook from MS Project VBA, then formatting a worksheet in it and
exporting data to it. I want to freeze the pane, and captured the steps
below in a macro from within Excel, then inserted it into the Project sub.

Problem: when the MS Project sub executes, the Select below executes and
the worksheet responds, and the True line below executes but the worksheet
doesn't respond.

'Freeze
Range("F5").Select
ActiveWindow.FreezePanes = True

Any ideas why this doesn't work?

Thanks,
George


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default FreezePanes from VBA?

This is Windows XP, Excel, and Project 2003, all updates.


"G Lykos" wrote in message
...
Greetings! Not understanding what I'm seeing. I'm creating an Excel
workbook from MS Project VBA, then formatting a worksheet in it and
exporting data to it. I want to freeze the pane, and captured the steps
below in a macro from within Excel, then inserted it into the Project sub.

Problem: when the MS Project sub executes, the Select below executes and
the worksheet responds, and the True line below executes but the worksheet
doesn't respond.

'Freeze
Range("F5").Select
ActiveWindow.FreezePanes = True

Any ideas why this doesn't work?

Thanks,
George




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 989
Default FreezePanes question

I was just logging in to ask a question about FreezePanes... will just append
it here.

I know that that's the way it's designed and written, etc...

But, logically, is there an explanation that someone can give to me why
FreezPanes is a property of the Window object, and not of the Worksheet
object?

Maybe I'm just missing it.

Thanks.


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 415
Default FreezePanes from VBA?

What are you expecting to happen ?
Are the Panes alraedy frozen ?

NickHK

"G Lykos" .gbl...
Greetings! Not understanding what I'm seeing. I'm creating an Excel
workbook from MS Project VBA, then formatting a worksheet in it and
exporting data to it. I want to freeze the pane, and captured the steps
below in a macro from within Excel, then inserted it into the Project sub.

Problem: when the MS Project sub executes, the Select below executes and
the worksheet responds, and the True line below executes but the worksheet
doesn't respond.

'Freeze
Range("F5").Select
ActiveWindow.FreezePanes = True

Any ideas why this doesn't work?

Thanks,
George




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 415
Default FreezePanes question

Mark,
If you make another window (WindowsNew) then arrange them so you see both
simultaneously.
Now freeze the panes somewhere on the active window.
You will see the other window is not affected.
Hence it is not a Worksheet property, but a property of the Window.
As you normally only have a single window/workbook, you tend not to notice
this behaviour.

NickHK

"mark" ...
I was just logging in to ask a question about FreezePanes... will just
append
it here.

I know that that's the way it's designed and written, etc...

But, logically, is there an explanation that someone can give to me why
FreezPanes is a property of the Window object, and not of the Worksheet
object?

Maybe I'm just missing it.

Thanks.




  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 989
Default FreezePanes question

I hear what you're saying, but I don't think that's the end of the story.

Think of it this way... if you have one workbook, with 10 sheets, and you
have the FreezePanes set on sheet 2, but not any other...

if you click any sheet but sheet 2, the FreezePanes is false, but if you
click on sheet 2, FreezePanes is true.

All in ONE window.

Hence, it is (or should be) also a property of the worksheet.


"NickHK" wrote:

Mark,
If you make another window (WindowsNew) then arrange them so you see both
simultaneously.
Now freeze the panes somewhere on the active window.
You will see the other window is not affected.
Hence it is not a Worksheet property, but a property of the Window.
As you normally only have a single window/workbook, you tend not to notice
this behaviour.

NickHK

"mark" ...
I was just logging in to ask a question about FreezePanes... will just
append
it here.

I know that that's the way it's designed and written, etc...

But, logically, is there an explanation that someone can give to me why
FreezPanes is a property of the Window object, and not of the Worksheet
object?

Maybe I'm just missing it.

Thanks.





  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default FreezePanes from VBA?

Nick, I was expecting that the pane would be frozen, same as if I did the
same thing by hand. However, I step through the execution, and the cell is
selected, per below, but then the VBA freezepanes method has no effect.
This from VBA running in MS Project.

George


"NickHK" wrote in message
...
What are you expecting to happen ?
Are the Panes alraedy frozen ?

NickHK

"G Lykos"

.gbl...
Greetings! Not understanding what I'm seeing. I'm creating an Excel
workbook from MS Project VBA, then formatting a worksheet in it and
exporting data to it. I want to freeze the pane, and captured the steps
below in a macro from within Excel, then inserted it into the Project

sub.

Problem: when the MS Project sub executes, the Select below executes

and
the worksheet responds, and the True line below executes but the

worksheet
doesn't respond.

'Freeze
Range("F5").Select
ActiveWindow.FreezePanes = True

Any ideas why this doesn't work?

Thanks,
George






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
.FreezePanes Bob McClellan Excel Programming 9 September 14th 06 02:20 PM
Help with Excel FreezePanes from code lanem Excel Programming 2 May 24th 06 07:37 PM
Problems specifying where "freezepanes" occurs using VBA broro183[_66_] Excel Programming 2 April 19th 06 12:00 PM
freezepanes Rob Excel Programming 1 January 6th 06 05:17 PM


All times are GMT +1. The time now is 11:00 PM.

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"