Error or Unexpected Behavior with Office Automation when you use early binding

  • Thread starter Thread starter Barb
  • Start date Start date
B

Barb

Error or Unexpected Behavior with Office Automation when
you use early binding in VB. Microsoft Article 319832.

I am getting this error randomly. I have followed all
the "What to do if you experience these problems" provided
in the Mircrosoft Article 319832. Still have issues
(although fewer).

Any suggestion Please..

Thanks,

Barb
 
Finding all the references to fully qualify can be tricky. It is easy to
miss them.

Also, have you tried late binding?
 
Tom, how do I invoke late binding?

I have set every module to Option Explicit etc per the
article.

Thank you.
Barb
 
In late binding, you would dimension all your objects as object and remove
your reference to Excel.

Instead of

dim oExcel as Excel.Application

you would do

dim oExcel as Object

and you would use GetObject or CreateObject rather than New.

Doesn't that article say that you don't have the problems it talks about
using late binding?

Here are some other articles:


http://support.microsoft.com/default.aspx?scid=kb;EN-US;244167
INFO: Writing Automation Clients for Multiple Office Versions

http://support.microsoft.com/default.aspx?scid=kb;en-us;245115
INFO: Using Early Binding and Late Binding in Automation

http://support.microsoft.com/default.aspx?scid=kb;en-us;247579
INFO: Use DISPID Binding to Automate Office Applications Whenever Possible
 

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