Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Accessing different versions of Excel VBA from another application
I often run Excel VBA applications from AutoCAD, but the reference to Excel
is particular to the company's computer that I use. When it is run on another computer with a different version of Excel, the application fails. Is there a way to check for Excel versions and apply the correct application reference? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Accessing different versions of Excel VBA from another application
Hi Bradley,
msgbox "Excel Version = " & Application.Version --- HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm Search Page: http://www.mvps.org/dmcritchie/excel/search.htm "Bradley Dawson" wrote in message ... I often run Excel VBA applications from AutoCAD, but the reference to Excel is particular to the company's computer that I use. When it is run on another computer with a different version of Excel, the application fails. Is there a way to check for Excel versions and apply the correct application reference? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Accessing different versions of Excel VBA from another application
Use late binding - don't have a reference to excel.
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 Bradley Dawson wrote in message ... I often run Excel VBA applications from AutoCAD, but the reference to Excel is particular to the company's computer that I use. When it is run on another computer with a different version of Excel, the application fails. Is there a way to check for Excel versions and apply the correct application reference? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Accessing different versions of Excel VBA from another application
Late binding WILL cause a perforance hit.....depending on your particular
application, this may or may not be acceptable. I would early bind and reference an earlier version of Excel (like 97 or 2000, assuming you don't use any features not supported by these apps). If the user has a new version of Excel you will be fine. Bill Barclift "Tom Ogilvy" wrote in message ... Use late binding - don't have a reference to excel. 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 Bradley Dawson wrote in message ... I often run Excel VBA applications from AutoCAD, but the reference to Excel is particular to the company's computer that I use. When it is run on another computer with a different version of Excel, the application fails. Is there a way to check for Excel versions and apply the correct application reference? |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Accessing different versions of Excel VBA from another application
I like that, but the office computer is up to date and only references the
latest version, user's home computer's usually have older versions. Also, once the program is run on a newer version, that seems to become the reference and won't run on older versions. Since I'm a newbie, I'll have to read up on this "binding" that I have skipped over so much. Thanks for the help. "Bill Barclift" wrote in message ... Late binding WILL cause a perforance hit.....depending on your particular application, this may or may not be acceptable. I would early bind and reference an earlier version of Excel (like 97 or 2000, assuming you don't use any features not supported by these apps). If the user has a new version of Excel you will be fine. Bill Barclift "Tom Ogilvy" wrote in message ... Use late binding - don't have a reference to excel. 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 Bradley Dawson wrote in message ... I often run Excel VBA applications from AutoCAD, but the reference to Excel is particular to the company's computer that I use. When it is run on another computer with a different version of Excel, the application fails. Is there a way to check for Excel versions and apply the correct application reference? |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Accessing different versions of Excel VBA from another application
Thanks Tom, these links will be my reading assignment! (Always wondered
what that binding thing was) "Tom Ogilvy" wrote in message ... Use late binding - don't have a reference to excel. 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 Bradley Dawson wrote in message ... I often run Excel VBA applications from AutoCAD, but the reference to Excel is particular to the company's computer that I use. When it is run on another computer with a different version of Excel, the application fails. Is there a way to check for Excel versions and apply the correct application reference? |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Accessing different versions of Excel VBA from another application
Thanks, David. I have your site in my favorites under programming. I
should have looked there first. "David McRitchie" wrote in message ... Hi Bradley, msgbox "Excel Version = " & Application.Version --- HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm Search Page: http://www.mvps.org/dmcritchie/excel/search.htm "Bradley Dawson" wrote in message ... I often run Excel VBA applications from AutoCAD, but the reference to Excel is particular to the company's computer that I use. When it is run on another computer with a different version of Excel, the application fails. Is there a way to check for Excel versions and apply the correct application reference? |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Accessing different versions of Excel VBA from another application
I would still approach it this way. Get a copy of someones older Excel type
library file called Excel8.olb or Excel9.olb. Put it on your computer (you don't need to do anything with it, just get a copy of it) and reference it before you save the Autocad file. This should work fine for your users. (I haven't tried this in VBA but have done it many times in VB....I think it should work fine in VBA, as well) Bill Barclift "Bradley Dawson" wrote in message ... I like that, but the office computer is up to date and only references the latest version, user's home computer's usually have older versions. Also, once the program is run on a newer version, that seems to become the reference and won't run on older versions. Since I'm a newbie, I'll have to read up on this "binding" that I have skipped over so much. Thanks for the help. "Bill Barclift" wrote in message ... Late binding WILL cause a perforance hit.....depending on your particular application, this may or may not be acceptable. I would early bind and reference an earlier version of Excel (like 97 or 2000, assuming you don't use any features not supported by these apps). If the user has a new version of Excel you will be fine. Bill Barclift "Tom Ogilvy" wrote in message ... Use late binding - don't have a reference to excel. 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 Bradley Dawson wrote in message ... I often run Excel VBA applications from AutoCAD, but the reference to Excel is particular to the company's computer that I use. When it is run on another computer with a different version of Excel, the application fails. Is there a way to check for Excel versions and apply the correct application reference? |
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
Accessing different versions of Excel VBA from another application
I don't believe the performance hit will be significant.
Microsoft is making the recommendation. -- Regards, Tom Ogilvy Bill Barclift wrote in message ... Late binding WILL cause a perforance hit.....depending on your particular application, this may or may not be acceptable. I would early bind and reference an earlier version of Excel (like 97 or 2000, assuming you don't use any features not supported by these apps). If the user has a new version of Excel you will be fine. Bill Barclift "Tom Ogilvy" wrote in message ... Use late binding - don't have a reference to excel. 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 Bradley Dawson wrote in message ... I often run Excel VBA applications from AutoCAD, but the reference to Excel is particular to the company's computer that I use. When it is run on another computer with a different version of Excel, the application fails. Is there a way to check for Excel versions and apply the correct application reference? |
#10
Posted to microsoft.public.excel.programming
|
|||
|
|||
Accessing different versions of Excel VBA from another application
The user doesn't save the file with updated references in VB as Bradley
describes. -- Regards, Tom Ogilvy Bill Barclift wrote in message ... I would still approach it this way. Get a copy of someones older Excel type library file called Excel8.olb or Excel9.olb. Put it on your computer (you don't need to do anything with it, just get a copy of it) and reference it before you save the Autocad file. This should work fine for your users. (I haven't tried this in VBA but have done it many times in VB....I think it should work fine in VBA, as well) Bill Barclift "Bradley Dawson" wrote in message ... I like that, but the office computer is up to date and only references the latest version, user's home computer's usually have older versions. Also, once the program is run on a newer version, that seems to become the reference and won't run on older versions. Since I'm a newbie, I'll have to read up on this "binding" that I have skipped over so much. Thanks for the help. "Bill Barclift" wrote in message ... Late binding WILL cause a perforance hit.....depending on your particular application, this may or may not be acceptable. I would early bind and reference an earlier version of Excel (like 97 or 2000, assuming you don't use any features not supported by these apps). If the user has a new version of Excel you will be fine. Bill Barclift "Tom Ogilvy" wrote in message ... Use late binding - don't have a reference to excel. 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 Bradley Dawson wrote in message ... I often run Excel VBA applications from AutoCAD, but the reference to Excel is particular to the company's computer that I use. When it is run on another computer with a different version of Excel, the application fails. Is there a way to check for Excel versions and apply the correct application reference? |
#11
Posted to microsoft.public.excel.programming
|
|||
|
|||
Accessing different versions of Excel VBA from another application
Sorry, apparently I did not communicate well.
The developer should get a copy of Excel8.olb or Excel9.olb and save it on his/her computer. Then reference this in the Autocad macro file just before saving, instead of their version of the Excel library. Redistribute this copy to the user. Com will re-route the reference to the users version of the Excel library just fine, as long the version of Excel is not older than the version the developer referenced when the file was saved. I tried this with AutoCAD 2002 and it worked just fine, just as it does in VB6. Bill Barclift "Tom Ogilvy" wrote in message ... The user doesn't save the file with updated references in VB as Bradley describes. -- Regards, Tom Ogilvy Bill Barclift wrote in message ... I would still approach it this way. Get a copy of someones older Excel type library file called Excel8.olb or Excel9.olb. Put it on your computer (you don't need to do anything with it, just get a copy of it) and reference it before you save the Autocad file. This should work fine for your users. (I haven't tried this in VBA but have done it many times in VB....I think it should work fine in VBA, as well) Bill Barclift "Bradley Dawson" wrote in message ... I like that, but the office computer is up to date and only references the latest version, user's home computer's usually have older versions. Also, once the program is run on a newer version, that seems to become the reference and won't run on older versions. Since I'm a newbie, I'll have to read up on this "binding" that I have skipped over so much. Thanks for the help. "Bill Barclift" wrote in message ... Late binding WILL cause a perforance hit.....depending on your particular application, this may or may not be acceptable. I would early bind and reference an earlier version of Excel (like 97 or 2000, assuming you don't use any features not supported by these apps). If the user has a new version of Excel you will be fine. Bill Barclift "Tom Ogilvy" wrote in message ... Use late binding - don't have a reference to excel. 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 Bradley Dawson wrote in message ... I often run Excel VBA applications from AutoCAD, but the reference to Excel is particular to the company's computer that I use. When it is run on another computer with a different version of Excel, the application fails. Is there a way to check for Excel versions and apply the correct application reference? |
#12
Posted to microsoft.public.excel.programming
|
|||
|
|||
Accessing different versions of Excel VBA from another application
You communicated fine.
Apparently you didn't read what Bradley said very well. The user opens the file in xl2002 at work and saves the file. The references were then updated to xl2002 references. The user takes the file home to work on excel 97, the file now doesn't work. Unlike a VB file. -- Regards, Tom Ogilvy Bill Barclift wrote in message ... Sorry, apparently I did not communicate well. The developer should get a copy of Excel8.olb or Excel9.olb and save it on his/her computer. Then reference this in the Autocad macro file just before saving, instead of their version of the Excel library. Redistribute this copy to the user. Com will re-route the reference to the users version of the Excel library just fine, as long the version of Excel is not older than the version the developer referenced when the file was saved. I tried this with AutoCAD 2002 and it worked just fine, just as it does in VB6. Bill Barclift "Tom Ogilvy" wrote in message ... The user doesn't save the file with updated references in VB as Bradley describes. -- Regards, Tom Ogilvy Bill Barclift wrote in message ... I would still approach it this way. Get a copy of someones older Excel type library file called Excel8.olb or Excel9.olb. Put it on your computer (you don't need to do anything with it, just get a copy of it) and reference it before you save the Autocad file. This should work fine for your users. (I haven't tried this in VBA but have done it many times in VB....I think it should work fine in VBA, as well) Bill Barclift "Bradley Dawson" wrote in message ... I like that, but the office computer is up to date and only references the latest version, user's home computer's usually have older versions. Also, once the program is run on a newer version, that seems to become the reference and won't run on older versions. Since I'm a newbie, I'll have to read up on this "binding" that I have skipped over so much. Thanks for the help. "Bill Barclift" wrote in message ... Late binding WILL cause a perforance hit.....depending on your particular application, this may or may not be acceptable. I would early bind and reference an earlier version of Excel (like 97 or 2000, assuming you don't use any features not supported by these apps). If the user has a new version of Excel you will be fine. Bill Barclift "Tom Ogilvy" wrote in message ... Use late binding - don't have a reference to excel. 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 Bradley Dawson wrote in message ... I often run Excel VBA applications from AutoCAD, but the reference to Excel is particular to the company's computer that I use. When it is run on another computer with a different version of Excel, the application fails. Is there a way to check for Excel versions and apply the correct application reference? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Please include fonts from previous versions ('98) in new versions | Excel Discussion (Misc queries) | |||
Accessing Excel pages using VB | Excel Discussion (Misc queries) | |||
Accessing WorksheetFunction.XX from regular C# Forms application | Excel Worksheet Functions | |||
Accessing Outlook from Excel | Excel Discussion (Misc queries) | |||
Excel.Application Instantiating Different Versions | Excel Programming |