Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default count number of workbooks open

I need some VBA code to check how many workbooks are open at the same time.
Can anyone help, please.

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 292
Default count number of workbooks open

Sub test()
MsgBox Application.Workbooks.Count
End Sub

Note that addins are not part of the visible workbooks collection.

HTH. Best wishes Harald

"Ronaldo" skrev i melding
...
I need some VBA code to check how many workbooks are open at the same

time.
Can anyone help, please.

Thanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default count number of workbooks open

Note that this will include any hidden workbooks such as Personal.xls.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Harald Staff" wrote in message
...
Sub test()
MsgBox Application.Workbooks.Count
End Sub

Note that addins are not part of the visible workbooks collection.

HTH. Best wishes Harald

"Ronaldo" skrev i melding
...
I need some VBA code to check how many workbooks are open at the same

time.
Can anyone help, please.

Thanks





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
How to tell the number of current open workbooks... [email protected] Excel Worksheet Functions 1 April 16th 07 04:06 PM
How to format a number cell to auto count 1 up on file open Joevee Excel Worksheet Functions 0 February 1st 06 05:00 PM
Number of workbooks open Tim U[_2_] Excel Programming 1 June 30th 04 06:03 PM
Excel 2003 Workbooks.Open with CorruptLoad=xlRepairFile fails on Excel 5.0/95 file due to Chart, with Error 1004 Method 'Open' of object 'Workbooks' failed Frank Jones Excel Programming 2 June 15th 04 03:21 AM
Workbooks.Open / .Open Text - How do you stop the .xls addition? Dave[_20_] Excel Programming 2 July 31st 03 04:03 AM


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