Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Error Handling - Check a file isn't already open before overwritin
I have some code that exports data from my workbook to a new workbook. The
file name is the strFile variable and the file folder path is the strFolder variable. wbNew.SaveAs strFolder & strFile & ".xls" wbNew.Close I get an error if you are exporting data for a second time and have forgotten to close down the exported file after viewing it. Can I put in some sort of check that will show a message saying the file is open, please close it and try again rather than it taking the user to the debugger. Thanks |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to check for Open File! | Excel Discussion (Misc queries) | |||
Error Handling | Excel Discussion (Misc queries) | |||
EXCEL:Can't open any file without error saying it's ALREADY open??? | Excel Worksheet Functions | |||
check if file is already open | Excel Discussion (Misc queries) | |||
Handling #NUM! error | Excel Worksheet Functions |