Thread: Trap Word Error
View Single Post
 
Old 05-07-2020, 02:17 PM
gmaxey gmaxey is offline Windows 10 Office 2016
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,429
gmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the rough
Default

Put and On Error statement before you attempt to open the file e.g.,

On Error GoTo Err_Handller


Then before the End Sub Line add:
lbl_Exit:
Exit Sub

Err_Handler:
Msgbox Err.Number & " " & Err.Description
Resume lbl_Exit
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote