What does syntax '_Object' mean?

B

baobob

On line:

with Application.FUBAR

I get error:

Method 'FUBAR' of object '_Application' failed

1. Why doesn't the error respect the VBA statement and say "of object
'Application' failed"?

2. What does syntax '_Object' mean?

Thanks.

***
 
J

JLGWhiz

In that statement, Application is the Object. VBA sees FUBAR as either a
property or a method of the Application object. In this case, the message
indicates it determined FUBAR to be a method and the method cannot execute,
ergo, the method FUBAR failed.
 
B

baobob

Thanks very much, JLGWhiz.

But that's not my question. The question is:

Why does the error message say "_Application", not "Application"?

What does the underline signify in the expression "_Object"?

***
 

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