Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Using Macros across different office versions

Hi,

I have an excel speadsheet that conatains a macro which performs some
automation tasks. The Macro was originally written with Office XP on
a
Windows XP System. The idea is something like the following:


1. Original template file opened (Read only) by party X who enters
some info into a form
2. When the command button in Excel is clicked a copy of the workbook
is saved and attached to an email which is sent to Party Y
3. Party Y who is using Office 2003 opens the sheet attached to the
email, makes some further changes to the form, then clicks the button
again. This saves a new copy and attaches the new copy to an email
which is passed back to Party X.


The problem is that the orignal workbook has "References" to various
Microsoft Office 10 Object Libraries (Excel and Outlook). When this
copy is opened using Office 2003 these references are updated to
point
to Microsoft Office 11 Object Libraries and the Macro runs fine but
when this is saved and passed back to Party X as in stage 3 mentioned
above the object Libraries (specifically the Outlook Object
Libraries)
don't revert back to Microsoft Office 10 Libraries as hoped.


So in short how can I get a macro saved in Office 2003 to work in
Office XP?


Any help on this would be appreciated.


Paul

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Using Macros across different office versions

Excel seems to be able to fix its own references along with that to the
Office library:

XL2000:
Create WB with some code.
References seen to XL 9.0
Save & Close

XL2002:
Open above saved WB
References seen to XL 10.0
Save As & Close

XL2000:
Open above saved WB
References seen to XL 9.0

So it would be the other reference(s), Outlook etc, that are not being
"down-dated". As it seems like your code is working and tested, you can drop
the references (and lose the benefit of Intellisense, but that is no longer
a concern) and switch to Late Binding, from your current Early Binding.
Whilst there is a slight performance hit and you cannot use Events with the
late bound objects, this would be the easiest way.
http://peltiertech.com/Excel/EarlyLateBinding.html

NickHK

"PMC1" wrote in message
ups.com...
Hi,

I have an excel speadsheet that conatains a macro which performs some
automation tasks. The Macro was originally written with Office XP on
a
Windows XP System. The idea is something like the following:


1. Original template file opened (Read only) by party X who enters
some info into a form
2. When the command button in Excel is clicked a copy of the workbook
is saved and attached to an email which is sent to Party Y
3. Party Y who is using Office 2003 opens the sheet attached to the
email, makes some further changes to the form, then clicks the button
again. This saves a new copy and attaches the new copy to an email
which is passed back to Party X.


The problem is that the orignal workbook has "References" to various
Microsoft Office 10 Object Libraries (Excel and Outlook). When this
copy is opened using Office 2003 these references are updated to
point
to Microsoft Office 11 Object Libraries and the Macro runs fine but
when this is saved and passed back to Party X as in stage 3 mentioned
above the object Libraries (specifically the Outlook Object
Libraries)
don't revert back to Microsoft Office 10 Libraries as hoped.


So in short how can I get a macro saved in Office 2003 to work in
Office XP?


Any help on this would be appreciated.


Paul



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Using Macros across different office versions

On May 15, 10:52 am, "NickHK" wrote:
Excel seems to be able to fix its own references along with that to the
Office library:

XL2000:
Create WB with some code.
References seen to XL 9.0
Save & Close

XL2002:
Open above saved WB
References seen to XL 10.0
Save As & Close

XL2000:
Open above saved WB
References seen to XL 9.0

So it would be the other reference(s), Outlook etc, that are not being
"down-dated". As it seems like your code is working and tested, you can drop
the references (and lose the benefit of Intellisense, but that is no longer
a concern) and switch to Late Binding, from your current Early Binding.
Whilst there is a slight performance hit and you cannot use Events with the
late bound objects, this would be the easiest way.http://peltiertech.com/Excel/EarlyLateBinding.html

NickHK

"PMC1" wrote in message

ups.com...



Hi,


I have an excel speadsheet that conatains a macro which performs some
automation tasks. The Macro was originally written with Office XP on
a
Windows XP System. The idea is something like the following:


1. Original template file opened (Read only) by party X who enters
some info into a form
2. When the command button in Excel is clicked a copy of the workbook
is saved and attached to an email which is sent to Party Y
3. Party Y who is using Office 2003 opens the sheet attached to the
email, makes some further changes to the form, then clicks the button
again. This saves a new copy and attaches the new copy to an email
which is passed back to Party X.


The problem is that the orignal workbook has "References" to various
Microsoft Office 10 Object Libraries (Excel and Outlook). When this
copy is opened using Office 2003 these references are updated to
point
to Microsoft Office 11 Object Libraries and the Macro runs fine but
when this is saved and passed back to Party X as in stage 3 mentioned
above the object Libraries (specifically the Outlook Object
Libraries)
don't revert back to Microsoft Office 10 Libraries as hoped.


So in short how can I get a macro saved in Office 2003 to work in
Office XP?


Any help on this would be appreciated.


Paul- Hide quoted text -


- Show quoted text -


Thanks Nick. That was very helpful. Problem solved!

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is solver different between Office versions? Jan Hime[_2_] Excel Worksheet Functions 1 January 15th 08 08:11 PM
Office 07 opening older versions in compatibility mode-min/maximiz Eric Dimbleby Excel Discussion (Misc queries) 0 June 11th 07 03:49 PM
Coping with multiple versions of Office travis[_3_] Excel Programming 1 October 2nd 06 02:32 PM
Office Excel 2003 Versions and VBA Cameron Young Setting up and Configuration of Excel 16 June 8th 05 12:54 AM
multiple versions of Office references R Avery Excel Programming 3 October 5th 04 06:41 AM


All times are GMT +1. The time now is 01:44 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"