how to display error message?

  • Thread starter Thread starter LunaMoon
  • Start date Start date
L

LunaMoon

Hi all,

I am using VC++ to develop some XLL file for use in Excel 2003.

Of course there are bugs.

The cell display "#NUM!".

But in VC++ I've already thrown exception with error message:

if (a!=b)
throw Constructor ("a must be equal b.", "myclass")...

Why couldn't I see the error message in Excel?

Thanks!
 
Is this what you are looking for?
Sub ErrorOut()
'Code that errors
On Error GoTo Handler:
'Other code
Exit Sub
Handler:
ErrMsg = Error(Err.Number)
MsgBox "Error Is: " & ErrMsg
End Sub
 

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

Back
Top