Thread: Different path
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Marc Gendron[_2_] Marc Gendron[_2_] is offline
external usenet poster
 
Posts: 16
Default 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