In VBA Check if a Workbook is Open

JillClaus

New Member
Joined
Jun 5, 2002
Messages
3
I'm using Excel 97.

I wrote some VBA code that loops through all of the workbooks in a specified subdirectory and popolates each of them with data from a MS Access 97 database. It works well, but I'm stuck on one thing....

How can I check to see if a specific workbook is currently open (or closed)?

Any help would be greatly appreciated.

Thanks,
Jill
 
Just had 2013 pushed to me, what I am finding now is that when running my code it seems to "go to fast" which causes excel to fail. I was looking for something to slow it down, thinking I could use IfWorkbookOpen..... I am not having any luck with this. Is there something else I need to be doing in between opening a workbook then closing it and opening another one? Keep in mind the workbooks are all unique in that they have a name ex. Thomas.xls and so on. I am just trying to create a pause to hopefully let each one open and close without issue
 
Upvote 0

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

Forum statistics

Threads
1,216,073
Messages
6,128,638
Members
449,461
Latest member
kokoanutt

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top