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
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi D'Al,
Thanks! Your code did exactly what I needed.
shanesuebsahakarn,
Thanks for the reply as well!
Thanks! Your code did exactly what I needed.
shanesuebsahakarn,
Thanks for the reply as well!
http://www.mvps.org/access/api/api0007.htm