Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 413
Default Loop through all Open workbooks

User has opened workbooks - I've no idea as to their names
nor how many.
With ActiveWorkbook will deal with one of them.
How do I get at the others, please?

Regards.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.700 / Virus Database: 457 - Release Date: 06/06/2004


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 77
Default Loop through all Open workbooks

Hi

You could do something like

For i = 1 to workbooks.count
workbooks(i).activate
'do whatever you want to the active workbook here
next i

HTH

Ken


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.692 / Virus Database: 453 - Release Date: 28/05/2004


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default Loop through all Open workbooks

Sub allwbs()
For Each wb In Workbooks
MsgBox wb.Name

Next
End Sub

--
Don Guillett
SalesAid Software

"Stuart" wrote in message
...
User has opened workbooks - I've no idea as to their names
nor how many.
With ActiveWorkbook will deal with one of them.
How do I get at the others, please?

Regards.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (
http://www.grisoft.com).
Version: 6.0.700 / Virus Database: 457 - Release Date: 06/06/2004




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 413
Default Loop through all Open workbooks

Many thanks to you both.
Doubly brain drained today.
Regards.

"Ken Macksey" wrote in message
...
Hi

You could do something like

For i = 1 to workbooks.count
workbooks(i).activate
'do whatever you want to the active workbook here
next i

HTH

Ken


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.692 / Virus Database: 453 - Release Date: 28/05/2004




---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.700 / Virus Database: 457 - Release Date: 06/06/2004


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
Loop through open workbooks Bob Phillips[_6_] Excel Programming 2 April 28th 04 09:28 AM
IF wokkbook1 is open, open workbook2 Loop Fio[_2_] Excel Programming 1 March 5th 04 01:10 PM
loop through workbooks Keith Willshaw Excel Programming 2 September 19th 03 12:48 PM
loop through workbooks Ron de Bruin Excel Programming 1 September 18th 03 02:53 PM
Can I have a loop to open a set of workbooks get some data, close it one a time. wellie Excel Programming 2 July 9th 03 04:58 AM


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