![]() |
Different path
Hi guys,
A snip of code to open a workbook or create one if it does not exist. On Error GoTo CreateNewWorkbook Application.ScreenUpdating = False Workbooks.Open directory & filetext Why does Excel keep poppin'up saying ".....cannot be found. Check your spelling, or try a different path. It does open my workbook if it exists, or it does go to "Create Workbook" and creates my workbook if not. Works fine. The only bug is the pop-screen. Well, you guys are the different path I'm trying. Thanks in advance Marc |
Different path
On Apr 10, 7:50*am, Marc Gendron
wrote: Hi guys, A snip of code to open a workbook or create one if it does not exist. On Error GoTo CreateNewWorkbook * * Application.ScreenUpdating = False * * Workbooks.Open directory & filetext Why does Excel keep poppin'up saying ".....cannot be found. Check your spelling, or try a different path. It does open my workbook if it exists, or it does go to "Create Workbook" and creates my workbook if not. Works fine. *The only bug is the pop-screen. Well, you guys are the different path I'm trying. Thanks in advance Marc Instead of wrapping the text with Application.ScreenUpdating=False, use Application.DisplayAlerts=False. Be sure to use Application.DisplayAlerts=True at the end of the code though! I'd put it right after the Workbooks.Open line as well as in the CreateNewWorkbook code in case it finishes out there. Thanks, Cory |
Different path
Thanks Cory
Works perfect ! Marc " wrote: On Apr 10, 7:50 am, Marc Gendron wrote: Hi guys, A snip of code to open a workbook or create one if it does not exist. On Error GoTo CreateNewWorkbook Application.ScreenUpdating = False Workbooks.Open directory & filetext Why does Excel keep poppin'up saying ".....cannot be found. Check your spelling, or try a different path. It does open my workbook if it exists, or it does go to "Create Workbook" and creates my workbook if not. Works fine. The only bug is the pop-screen. Well, you guys are the different path I'm trying. Thanks in advance Marc Instead of wrapping the text with Application.ScreenUpdating=False, use Application.DisplayAlerts=False. Be sure to use Application.DisplayAlerts=True at the end of the code though! I'd put it right after the Workbooks.Open line as well as in the CreateNewWorkbook code in case it finishes out there. Thanks, Cory |
All times are GMT +1. The time now is 06:11 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com