Yeoman.jeremy
Board Regular
- Joined
- Apr 4, 2011
- Messages
- 90
hi there.
I've written a macro, which requires opening a certain workbook then closing it again. I want this macro to only work if the file is closed to start with.
I know how to make an 'ok only' messagebox, but how do i use the retry/cancel, so that if there is an error with opening the file (i.e if it is already open) it runs the retry/cancel?
I want the retry to check if it can open the file again, and the cancel to stop the macro without showing the "debug, end" msgbox etc
help would be much appreciated
I've written a macro, which requires opening a certain workbook then closing it again. I want this macro to only work if the file is closed to start with.
I know how to make an 'ok only' messagebox, but how do i use the retry/cancel, so that if there is an error with opening the file (i.e if it is already open) it runs the retry/cancel?
I want the retry to check if it can open the file again, and the cancel to stop the macro without showing the "debug, end" msgbox etc
help would be much appreciated