Lynn_AccessUser
Registered User.
- Local time
- Today, 05:01
- Joined
- Feb 4, 2003
- Messages
- 125
I have code that runs and upon completion an excel spreadsheet is opened. What I would like to do before the code runs is to check to see if the spreadsheet is already open. If the spreadsheet is open it will give the user a msgbox telling them to close the spreadsheet first. If the spreadsheet is not open, the code will then run.
The reason behind this madness is that the spreadsheet that is opened is linked to another spreadsheet and the code runs a dts package. If the spreadsheet is open it can not run the dts package which updates the data. I have the code written if the package fails to execute it will give the user a msgbox. Problem is that it takes so long to fail that it basically makes it look like the app is locked up so I would prefer to prevent the users from even getting to that point.
Thanks!!!
The reason behind this madness is that the spreadsheet that is opened is linked to another spreadsheet and the code runs a dts package. If the spreadsheet is open it can not run the dts package which updates the data. I have the code written if the package fails to execute it will give the user a msgbox. Problem is that it takes so long to fail that it basically makes it look like the app is locked up so I would prefer to prevent the users from even getting to that point.
Thanks!!!