Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
how can I by macro add and remove thit refernces: Microsoft Word X.0 Object Library C:\Program Files\Microsoft Office\OfficeX\MSWORD.OLB x - menas 10 or 11, thats the problem I need this reference switch by version of Office I hope somebady help me. Thanks tom |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() IMO there is NO need to switch references, just make sure that you get no compile errors in either version. (very likely the oldest) OR use latebound code.... if you still want to change /add references you MUST be sure that users have "Allow access to visual basic project" enabled... (and from Office 2003 you can only change this via the registry) then you can access refs via Application.VBE.ActiveVBproject.References It may be a good idea to add a reference to VB Extensibility. But as I said there is NO need. -- keepITcool | www.XLsupport.com | keepITcool chello nl | amsterdam Tom wrote : Hello, how can I by macro add and remove thit refernces: Microsoft Word X.0 Object Library C:\Program Files\Microsoft Office\OfficeX\MSWORD.OLB x - menas 10 or 11, thats the problem I need this reference switch by version of Office I hope somebady help me. Thanks tom |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
"NO need" isn't always generally true -but I haven't tested this on Office
libraries. I have excel files that are used by multiple users, and it has reference to ADO. I wrote and compiled it using ADO 2.1. One of our users had an upgrade to ADO 2.5. The file upgraded the reference, remembered it on Save and expected 2.5 next time it ran. After that it refused to run on a 2.1 machine even without 2.5 spesific objects or commands in the code. They don't call it "dll hell" for nothing, there is at least a potential problem somewhere :-) Best wishes Harald "keepITcool" skrev i melding ft.com... IMO there is NO need to switch references, just make sure that you get no compile errors in either version. (very likely the oldest) |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Tom
You are best off using "late binding" for this. Which usually means that you replace all known hardcoded object types with simply "Object" and let Windows and the registry do the detective work. See http://erlandsendata.no/english/inde...baoleolebasics HTH. Best wishes Harald "Tom" skrev i melding ... Hello, how can I by macro add and remove thit refernces: Microsoft Word X.0 Object Library C:\Program Files\Microsoft Office\OfficeX\MSWORD.OLB x - menas 10 or 11, thats the problem I need this reference switch by version of Office I hope somebady help me. Thanks tom |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Nesting a sheet name reference within a cell reference??? | Excel Discussion (Misc queries) | |||
Changing sheet reference to cell reference | Excel Worksheet Functions | |||
Using an offset formula for the reference in a relative reference | Excel Worksheet Functions | |||
Row reference increment but preserve column reference | Excel Worksheet Functions | |||
Macro to Reference Column Next to Current Reference | Excel Discussion (Misc queries) |