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,617
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
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