ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Reference mis-alignment (https://www.excelbanter.com/excel-programming/315133-reference-mis-alignment.html)

Sheldon

Reference mis-alignment
 
I am creating an Excel workbook with lots of VBA code. I cam creating this
in Excel 2000 (aka Version 9). At least 90 % of the employees at my site use
Excel 2000. However, whenever my boss opens the workbook, the references get
changed for his use. He uses Excel 2003 (aka Version 11). When I go back in
the reference is broken. I cannot find Microsoft Office 11, naturally.

It seems the references change automatically when the user has a newer
version of Office, but not so when the user has an older version of Office.

I'm not so concerded about my boss breaking my reference, but when the
product is rolled out, I expect this to happen even more. The prodect will
be placed on the interned, the authorized users will download it to their
desktop and run from there.

How can I fix this problem? How can I make the reference upgrade work in
both directions of versions? Maybe I don't really have a problem and don't
realize it?

Thanks

Dave Peterson[_3_]

Reference mis-alignment
 
Maybe you could develop your code with the reference, but before you release it
to others, you could convert it to use latebinding.

Dick Kusleika has a web page at:
http://www.dicks-clicks.com/excel/olBinding.htm
that explains this with Outlook

Tom Ogilvy posted this recently:

Here are some more extensive references on binding:

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

Sheldon wrote:

I am creating an Excel workbook with lots of VBA code. I cam creating this
in Excel 2000 (aka Version 9). At least 90 % of the employees at my site use
Excel 2000. However, whenever my boss opens the workbook, the references get
changed for his use. He uses Excel 2003 (aka Version 11). When I go back in
the reference is broken. I cannot find Microsoft Office 11, naturally.

It seems the references change automatically when the user has a newer
version of Office, but not so when the user has an older version of Office.

I'm not so concerded about my boss breaking my reference, but when the
product is rolled out, I expect this to happen even more. The prodect will
be placed on the interned, the authorized users will download it to their
desktop and run from there.

How can I fix this problem? How can I make the reference upgrade work in
both directions of versions? Maybe I don't really have a problem and don't
realize it?

Thanks


--

Dave Peterson


Nathan Strom

Reference mis-alignment
 
"Sheldon" wrote in message ...
I am creating an Excel workbook with lots of VBA code. I cam creating this
in Excel 2000 (aka Version 9). At least 90 % of the employees at my site use
Excel 2000. However, whenever my boss opens the workbook, the references get
changed for his use. He uses Excel 2003 (aka Version 11). When I go back in
the reference is broken. I cannot find Microsoft Office 11, naturally.

It seems the references change automatically when the user has a newer
version of Office, but not so when the user has an older version of Office.

I'm not so concerded about my boss breaking my reference, but when the
product is rolled out, I expect this to happen even more. The prodect will
be placed on the interned, the authorized users will download it to their
desktop and run from there.

How can I fix this problem? How can I make the reference upgrade work in
both directions of versions? Maybe I don't really have a problem and don't
realize it?


If you save in Office 2000, your spreadsheet will be compatible with
Office 2000, Office 2002 (XP), and Office 2003. If you save in 2002,
it will be compatible with 2002 and 2003, and if you save in 2003, it
will be compatible with 2003. Of course, when I say compatible here I
just mean "able to be opened without an error message" -- opening on
an older version will still work, but the references will have to be
manually fixed.

When your boss opens the file on Office 2003, it will automatically
upgrade the references for him, but the references won't be changed in
the file he opened unless he *saves* the file.

If your deployed spreadsheet is not going to be edited by end-users
but only read, there's no need to worry -- if you save in 2000 anyone
using 2000 and up will be able to open it without a problem. If the
spreadsheet is going to be saved by end-users, you should switch to
using late binding for your Office objects.


All times are GMT +1. The time now is 10:38 AM.

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