This procedure tries to open a non-existent macro. GetErrorString is used in the error handler.
Sub ErrorStringDemo()
On Error GoTo handler
Session.RunMacro "NoSuchMacro", ""
Exit Sub
handler:
MsgBox GetErrorString(Err.Number)
Exit Sub
End Sub