Show Error discription in MsgBox
Sub ErrorTrap2()
Dim Answer As Long, MyFile As String
Dim Message As String, currentPath As String
On Error GoTo errTrap
MyFile = "A:\Data.xls"
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs FileName:=MyFile
Exit Sub
errTrap:
MsgBox Err.Description
End Sub
Related examples in the same category