Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 236
Default How to get ActiveWindow

What is the parent of ActiveWindow?

It's not available as ThisWorkbook.ActiveWindow or
Application.ActiveWindow .

Thanks.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default How to get ActiveWindow

I can only describe parentage of Excel's Windows as ambigous!

Assuming there is an active workbook, instead of ActiveWindow try -

Activeworkbook.windows(1)

which should return its expected parent.

Curiosity, why do you need to know its parent.

FWIW
b = ActiveWindow Is Nothing
is one way to determine there are no visible workbooks

Regards,
Peter T


wrote in message
oups.com...
What is the parent of ActiveWindow?

It's not available as ThisWorkbook.ActiveWindow or
Application.ActiveWindow .

Thanks.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default How to get ActiveWindow

If your trying to get the Workbook name it would be
ThisWorkBook.Name

or the active worksheet would be

ActiveSheet.Name


" wrote:

What is the parent of ActiveWindow?

It's not available as ThisWorkbook.ActiveWindow or
Application.ActiveWindow .

Thanks.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 236
Default How to get ActiveWindow

I'm trying to create a FreezePane from VBScript without creating an
Excel Macro and calling that.

Curiosity, why do you need to know its parent.


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default How to get ActiveWindow

ActiveWindow.Parent.Name
or
Application.Windows(1).Parent.Name

And to go the other way:
ThisWorkbook.Windows(1).Caption

Note that a WB may have more than 1 window. This is shown by
Thisworkbook.Windows.Count and the .WindowNumber property of each of these
windows.

But I'll certainly agree with Peter that the way WBs and Windows are related
is not always clear.

NickHK

wrote in message
oups.com...
What is the parent of ActiveWindow?

It's not available as ThisWorkbook.ActiveWindow or
Application.ActiveWindow .

Thanks.





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default How to get ActiveWindow

Might look at this posting "VB code to FreezePane a row in an Excel
spreadsheet".

http://www.experts-exchange.com/Prog..._21165508.html



" wrote:

I'm trying to create a FreezePane from VBScript without creating an
Excel Macro and calling that.

Curiosity, why do you need to know its parent.



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.ActiveWindow Is Excel.ActiveWindow Returns False Neal Andrews Excel Programming 1 October 26th 06 11:10 AM
How can I refer to the ActiveWindow CarolineHedges[_10_] Excel Programming 3 July 6th 06 01:14 PM
ActiveWindow VBA problem Tomasz Klim[_2_] Excel Programming 2 June 11th 06 11:04 PM
Setting ScrollRoll without ActiveWindow [email protected] Excel Programming 1 February 24th 06 12:02 AM
Using ActiveWindow.PointsToScreenPixelsY Pancho Excel Programming 5 February 7th 04 11:23 PM


All times are GMT +1. The time now is 03:46 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"