Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Generic Window Activate

Hi! I was wondering how to activate the nonactive workbook
open in Excel without naming it explicitly? For instance,
I would like to say Activeworkbooks(generic).activate
instead of Activeworkbooks("July ROI").activate

Thank you so much!

Michael
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Generic Window Activate

Michael,

You could try something like

For Each owb In Workbooks
If owb.Name < ActiveWorkbook.Name Then
owb.Activate
End If
Next owb

but couldn't there be more than one?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Michael" wrote in message
...
Hi! I was wondering how to activate the nonactive workbook
open in Excel without naming it explicitly? For instance,
I would like to say Activeworkbooks(generic).activate
instead of Activeworkbooks("July ROI").activate

Thank you so much!

Michael



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default Generic Window Activate

If there are only 2 windows (including hidden ones):

Windows((ActiveWindow.Index Mod 2)+1).Activate

--

Vasant


"Michael" wrote in message
...
Hi! I was wondering how to activate the nonactive workbook
open in Excel without naming it explicitly? For instance,
I would like to say Activeworkbooks(generic).activate
instead of Activeworkbooks("July ROI").activate

Thank you so much!

Michael



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 599
Default Generic Window Activate

Michael

Also look at the ActivateNext and ActivatePrevious methods of the Window
object, e.g.

ActiveWindow.ActivateNext

--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.

"Vasant Nanavati" <vasantn *AT* aol *DOT* com wrote in message
...
If there are only 2 windows (including hidden ones):

Windows((ActiveWindow.Index Mod 2)+1).Activate

--

Vasant


"Michael" wrote in message
...
Hi! I was wondering how to activate the nonactive workbook
open in Excel without naming it explicitly? For instance,
I would like to say Activeworkbooks(generic).activate
instead of Activeworkbooks("July ROI").activate

Thank you so much!

Michael





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
Cannot activate an Addin via the add-ins window in XL 2007 [email protected] Excel Discussion (Misc queries) 0 June 3rd 09 02:41 AM
Activate new window Robert Rosenberg[_2_] Excel Programming 0 December 30th 03 04:46 PM
Activate new window Tom Ogilvy Excel Programming 0 December 30th 03 04:37 PM
Activate Non-Excel Window Through VBA Mark Bigelow Excel Programming 1 September 3rd 03 07:37 PM
How to keep window + form activate together John Brash Excel Programming 1 July 24th 03 10:13 AM


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