ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Find and set references at runtime (https://www.excelbanter.com/excel-programming/379031-find-set-references-runtime.html)

rezafloyd

Find and set references at runtime
 
Dear experts,
I want to write a VBA code in Excel to connect to Autocad. It's a
simple task at design time. But if my code runs at another system with
different version of Autocad it fails.
What I need is a procedure to find all available Autocad references in
the system and set the reference to newest one.
Best regards
Reza


Tom Ogilvy

Find and set references at runtime
 
http://support.microsoft.com/?id=160647
XL97: How to Programmatically Create a Reference

shows how to create a reference

You can use late binding to work with autocad without creating a reference
(which is the usual approach recommended)

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

http://support.microsoft.com/default...32&Product=xlw
INFO: Error or Unexpected Behavior with Office Automation When You Use Early
Binding in Visual Basic

--
Regards,
Tom Ogilvy


"rezafloyd" wrote in message
oups.com...
Dear experts,
I want to write a VBA code in Excel to connect to Autocad. It's a
simple task at design time. But if my code runs at another system with
different version of Autocad it fails.
What I need is a procedure to find all available Autocad references in
the system and set the reference to newest one.
Best regards
Reza





All times are GMT +1. The time now is 09:26 AM.

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