Just a quickie. I'm rusty and can't find this in Excel's Help.
How do I test to see if a workbook of a given name is open in my Windows session?
Just a quickie. I'm rusty and can't find this in Excel's Help.
How do I test to see if a workbook of a given name is open in my Windows session?
Last edited by ffffloyd; 04-14-2009 at 02:03 AM.
Hi Floyd,
The following code will check if another workbook is open IN THE SAME Excel instance (different window, but only one excel.exe running). If you open a second Excel instance it will not be checked by this code.
![]()
Please Login or Register to view this content.
Thanks Paul. So there's no way of doing it without triggering an error if the workbook isn't open? It's just that I already have an ON ERROR operating and would prefer not to have to fiddle around with it if possible.
Last edited by ffffloyd; 04-14-2009 at 01:00 AM. Reason: clarification
D'OH! I can just step through the Workbooks collection, can't I, testing each name to see if it matches the one I want? It probably isn't as sophisticated as your code, Paul, but I reckon that'll do what I want.
No worries, I seem to have answered my own question. Thanks for your help though.
Here's a User Defined Function (UDF) that tests if a workbook is open
![]()
Please Login or Register to view this content.
Hope that helps.
RoyUK
--------
For Excel Tips & Solutions, free examples and tutorials why not check out my web site
Free DataBaseForm example
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks