ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   multiple versions of Office references (https://www.excelbanter.com/excel-programming/312443-multiple-versions-office-references.html)

R Avery

multiple versions of Office references
 
I have Office 10 and Visio 11 (2003) installed. In VB6, i can only bind
to a reference to Office 11. I think this is a problem, because most
people in the company don't have the Office 11 libraries, and they are
getting errors when loading the Excel COM addin. I have to do more
testing, but I think this might be why.

Can anyone tell me if they think this might be happening, whether or not
this can other problems, and how to i make a reference to a previous
Office library when a newer one is installed.

Any help would be most appreciated.

Harald Staff

multiple versions of Office references
 
Hi

It's not obvious to me what you're building, but in general this is "late
binding", see mr Erlandsens' page
http://www.erlandsendata.no/english/...baoleolebasics

HTH. Best wishes Harald

"R Avery" skrev i melding
...
I have Office 10 and Visio 11 (2003) installed. In VB6, i can only bind
to a reference to Office 11. I think this is a problem, because most
people in the company don't have the Office 11 libraries, and they are
getting errors when loading the Excel COM addin. I have to do more
testing, but I think this might be why.

Can anyone tell me if they think this might be happening, whether or not
this can other problems, and how to i make a reference to a previous
Office library when a newer one is installed.

Any help would be most appreciated.




Bob Phillips[_6_]

multiple versions of Office references
 
Use late binding.

Instead of something like

Dim wdApp As Word.Application

Set wdApp = New Word.Application

you would use

Dim wdApp As Object

Set wdApp = CreateObject("Word.Application")

and you don't set a reference in VBE (which is where the problem arises).

but you don't have access to the application constants in this case

One technique is to develop with early binding, and change to late binding
to release. There is a walk-through example at
http://www.xldynamic.com/source/xld.EarlyLate.html

--

HTH

RP

"R Avery" wrote in message
...
I have Office 10 and Visio 11 (2003) installed. In VB6, i can only bind
to a reference to Office 11. I think this is a problem, because most
people in the company don't have the Office 11 libraries, and they are
getting errors when loading the Excel COM addin. I have to do more
testing, but I think this might be why.

Can anyone tell me if they think this might be happening, whether or not
this can other problems, and how to i make a reference to a previous
Office library when a newer one is installed.

Any help would be most appreciated.




R Avery

multiple versions of Office references
 
THanks, but let us assume that even though I have the office 11 type
library available, I never want to use it. I only want to use the
office 10 type library, but it does not appear in the References list.
Is there anyway to do this?


Bob Phillips wrote:
Use late binding.

Instead of something like

Dim wdApp As Word.Application

Set wdApp = New Word.Application

you would use

Dim wdApp As Object

Set wdApp = CreateObject("Word.Application")

and you don't set a reference in VBE (which is where the problem arises).

but you don't have access to the application constants in this case

One technique is to develop with early binding, and change to late binding
to release. There is a walk-through example at
http://www.xldynamic.com/source/xld.EarlyLate.html



All times are GMT +1. The time now is 01:05 AM.

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