Link to home
Start Free TrialLog in
Avatar of rusco
rusco

asked on

VBA: Checking and closing an Excel file from Access

Hi Experts!

I have an access program that creates an excel file to log in any errors I have encountered while the program is running (I don't really open the excel file such that it shows in the taskbar). My question is how can I check if the excel file is open (active)? (Meaning it is open and it's in my taskbar) I want to be able to check if it's open and then be able to close the excel file to ensure that I won't get any errors while I use my program. I always end up with something going wrong in the program when the excel file I use is open. Hope I made sense.

Thanks in advance!

rusco
Avatar of shanesuebsahakarn
shanesuebsahakarn
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER CERTIFIED SOLUTION
Avatar of samopal
samopal

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rusco
rusco

ASKER

Hi D'Al,

Thanks! Your code did exactly what I needed.

shanesuebsahakarn,

Thanks for the reply as well!