![]() |
macro-file could not be found
I haved a macro that copy information from a closed workbook. If the macro
doesn't find the closed workboo, i receive an error '1004': file......could not be found. Is there an code to avoid this error? Or, better...if there is an code that will display, instead of '1004' error, a message: "there is no entry for this day". Can this be done? Thanks! |
macro-file could not be found
Perhaps something like:
Test = Dir("C:\Some File Path\Workbook.xls") If Test = "" then msgbox "There is no entry for this day" exit sub end if -- Best Regards, Luke M *Remember to click "yes" if this post helped you!* "puiuluipui" wrote: I haved a macro that copy information from a closed workbook. If the macro doesn't find the closed workboo, i receive an error '1004': file......could not be found. Is there an code to avoid this error? Or, better...if there is an code that will display, instead of '1004' error, a message: "there is no entry for this day". Can this be done? Thanks! |
macro-file could not be found
Perfect!
Thanks! "Luke M" wrote: Perhaps something like: Test = Dir("C:\Some File Path\Workbook.xls") If Test = "" then msgbox "There is no entry for this day" exit sub end if -- Best Regards, Luke M *Remember to click "yes" if this post helped you!* "puiuluipui" wrote: I haved a macro that copy information from a closed workbook. If the macro doesn't find the closed workboo, i receive an error '1004': file......could not be found. Is there an code to avoid this error? Or, better...if there is an code that will display, instead of '1004' error, a message: "there is no entry for this day". Can this be done? Thanks! |
All times are GMT +1. The time now is 07:58 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com