Problem with on error

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
 
S

Sue Mosher [MVP]

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.
 
P

Pierre Dumont

Ok thanks

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

I'll do that.

Pierre
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top