ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Error or Unexpected Behavior with Office Automation when you use early binding (https://www.excelbanter.com/excel-programming/309990-error-unexpected-behavior-office-automation-when-you-use-early-binding.html)

Barb[_5_]

Error or Unexpected Behavior with Office Automation when you use early binding
 
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

Tom Ogilvy

Error or Unexpected Behavior with Office Automation when you use early binding
 
Finding all the references to fully qualify can be tricky. It is easy to
miss them.

Also, have you tried late binding?

--
Regards,
Tom Ogilvy

"Barb" wrote in message
...
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




Barb[_5_]

Error or Unexpected Behavior with Office Automation when you use early binding
 
Tom, how do I invoke late binding?

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

Thank you.
Barb
-----Original Message-----
Finding all the references to fully qualify can be

tricky. It is easy to
miss them.

Also, have you tried late binding?

--
Regards,
Tom Ogilvy

"Barb" wrote in

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



.


Tom Ogilvy

Error or Unexpected Behavior with Office Automation when you use early binding
 
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...b;EN-US;244167
INFO: Writing Automation Clients for Multiple Office Versions

http://support.microsoft.com/default...b;en-us;245115
INFO: Using Early Binding and Late Binding in Automation

http://support.microsoft.com/default...b;en-us;247579
INFO: Use DISPID Binding to Automate Office Applications Whenever Possible


--
Regards,
Tom Ogilvy



"Barb" wrote in message
...
Tom, how do I invoke late binding?

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

Thank you.
Barb
-----Original Message-----
Finding all the references to fully qualify can be

tricky. It is easy to
miss them.

Also, have you tried late binding?

--
Regards,
Tom Ogilvy

"Barb" wrote in

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



.





All times are GMT +1. The time now is 11:45 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com