Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default How do I switch between windows in the active workbook inside a M.

Hi,
To get the name of the book use
ActiveWorkbook.Name
so
Windows(ActiveWorkbook.Name & ":2").Activate
Also you can reference the active window by using ActiveWindow

I hope this helps,
Sebastien

"kdreyer" wrote:

How do I switch between windows in the active workbook inside a Macro.

I have a Macro that reformats how ever I need it to do that in Window 2 of
the active workbook. I cannot have it file specific. It needs to take the
active filename and drop it into the formula.

Here is what I have so far. This works but I cannot figure out how to get
the active filename.:

Windows("FS Side Vent.xls:2").Activate
Sheets("Print").Select
Range("OrderNo").Select
Cells.Select
Selection.EntireRow.Hidden = False
For I = 1 To 800
Range("A" & I).Select
If ActiveCell.Value = "0" Then
Selection.EntireRow.Hidden = True
Else
End If

Next I

Range("OrderNo").Select

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
Not able to switch between windows guy_withaquestion Excel Discussion (Misc queries) 0 February 2nd 09 03:12 PM
Impossible to switch between the windows/books Anders5554 Excel Discussion (Misc queries) 2 July 21st 07 04:00 PM
Can I keep "Windows of active workbook check box" checked SueH Excel Discussion (Misc queries) 1 February 15th 07 07:38 PM
Macro switch between windows question punter Excel Discussion (Misc queries) 3 June 21st 06 06:11 PM
Preventing opening workbook inside active workbook. Serge[_4_] Excel Programming 2 November 4th 03 07:51 PM


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

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

About Us

"It's about Microsoft Excel"