Hi everyone,
What is the suitable VBA code that counts all active workbooks and show the result in a msgbox?
Thanks,
Hi everyone,
What is the suitable VBA code that counts all active workbooks and show the result in a msgbox?
Thanks,
Last edited by LoveCandle; 04-21-2009 at 04:42 AM.
Perhaps:
By active I presume you mean open... only 1 workbook is active at any given time.Please Login or Register to view this content.
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
Number of open workbooks will be given by:
this won't double count workbooks that have two or more windows open.Please Login or Register to view this content.
Richard
Richard Schollar
Microsoft MVP - Excel
Thanks for the correction.
Thank you both, the code is working but it adds one to the total, Can you test the code??
Do you run a personal.xls file ?
Yes, and I think this is the problem.
Last edited by LoveCandle; 04-22-2009 at 05:47 AM.
Given I presume you can't assume this to always be the case (ie other clients etc) then you will need to test if Personal.xls is open if it is to be discounted...
Please Login or Register to view this content.
Hi,
Very nice useful code from you DonkeyOte,
I used it as a function:
Thanks,Please Login or Register to view this content.
Last edited by LoveCandle; 04-22-2009 at 05:20 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks