Hello All
I hope you can help on this.
I have some VBA code that opens a file C:\tmp\SOSAX.CSV
If the file is not there the code Bugs out.
Is it possible that if this error occurs a Message box opens up saying "Export SOSAX file first" instead of the error popup.
Application.DisplayAlerts = False
Application.ScreenUpdating = False
Workbooks.Open Filename:="C:\tmp\SOSAX.CSV"
Range("A1:O500").Select
Selection.Copy
Windows("Energy CVI.xls").Activate
Sheets("Data").Select
Range("B6").Select
ActiveSheet.Paste
Windows("SOSAX.CSV").Activate
ActiveWindow.Close
ThisWorkbook.Saved = True
I hope you can help on this.
I have some VBA code that opens a file C:\tmp\SOSAX.CSV
If the file is not there the code Bugs out.
Is it possible that if this error occurs a Message box opens up saying "Export SOSAX file first" instead of the error popup.
Application.DisplayAlerts = False
Application.ScreenUpdating = False
Workbooks.Open Filename:="C:\tmp\SOSAX.CSV"
Range("A1:O500").Select
Selection.Copy
Windows("Energy CVI.xls").Activate
Sheets("Data").Select
Range("B6").Select
ActiveSheet.Paste
Windows("SOSAX.CSV").Activate
ActiveWindow.Close
ThisWorkbook.Saved = True