Problem with on error

  • Thread starter Thread starter Pierre Dumont
  • Start date Start date
P

Pierre Dumont

Hi,

I'm trying to trap an error with On Error Goto in a form. It's a task
form in Outlook 2000. I always get an syntax error. I don't understand since
it's working fine in VB.

Thanks

Pierre

Code i'm trying...............

Private Sub cmdText_Click()

On Error GoTo cmdTest_Click_Err

If SaveDetails() Then

MsgBox "Details Saved OK", vbInformation

Else

MsgBox "Details have not been saved", vbCritical

End If

Exit Sub

cmdTest_Click_Err:

MsgBox Err.Description & vbCrLf & Err.Number

End Sub
 
Outlook forms don't use VB. They use VBScripts, which supports only On Error
Resume Next. You'll need to rewrite the logic of your error handler.
 
Ok thanks

I saw many example on the web but none was saying that.

I'll do that.

Pierre
 
Back
Top