Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default VBA Refrerences which interfere

Hello,
In MS Project 2003, I have a VBA procedure which reads a database and
imports the data into Project.
The VBA References are :
- Visual Basic For Applications
- OLE Automation
- Microsoft Office 9.0 Object Library
Everything is working well until now.

I add a new VBA procedure which exports data toward Excel (version 2003 on
my PC)
So I create a new VBA Reference on "Microsoft Excel 11.0 Object Library".
Every thing works fine on my PC which is running Excel 2003.
But on all the other PCs in the Company, which are running Excel 2000,
nothing works anymore. Even the first procedure which doesn't use Excel!
Where this problem is coming from ? What I have to do so that every VBA
procedure works with every Excel version ?
Thanks ahead for your help!

Gérard


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default VBA Refrerences which interfere

Excel references are not necessarily downward compatible. Your
reference to version 11 doesn't "downgrade" to earlier versions
of Excel. If you have Excel 2000 on your machine, use that as a
reference. If you don't, you have to use "Late Binding", which
means that you need to change every reference to an Excel object
to As Object. So instead of

Dim Rng As Excel.Range
change to
Dim Rng As Object


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"Gérard Ducouret" wrote in
message ...
Hello,
In MS Project 2003, I have a VBA procedure which reads a
database and
imports the data into Project.
The VBA References are :
- Visual Basic For Applications
- OLE Automation
- Microsoft Office 9.0 Object Library
Everything is working well until now.

I add a new VBA procedure which exports data toward Excel
(version 2003 on
my PC)
So I create a new VBA Reference on "Microsoft Excel 11.0
Object Library".
Every thing works fine on my PC which is running Excel 2003.
But on all the other PCs in the Company, which are running
Excel 2000,
nothing works anymore. Even the first procedure which doesn't
use Excel!
Where this problem is coming from ? What I have to do so that
every VBA
procedure works with every Excel version ?
Thanks ahead for your help!

Gérard




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default VBA Refrerences which interfere

Make the reference to the
"Microsoft Excel 9.0 Object Library"

same as you did for office.

--
Regards,
Tom Ogilvy


"Gérard Ducouret" wrote in message
...
Hello,
In MS Project 2003, I have a VBA procedure which reads a database and
imports the data into Project.
The VBA References are :
- Visual Basic For Applications
- OLE Automation
- Microsoft Office 9.0 Object Library
Everything is working well until now.

I add a new VBA procedure which exports data toward Excel (version 2003 on
my PC)
So I create a new VBA Reference on "Microsoft Excel 11.0 Object Library".
Every thing works fine on my PC which is running Excel 2003.
But on all the other PCs in the Company, which are running Excel 2000,
nothing works anymore. Even the first procedure which doesn't use Excel!
Where this problem is coming from ? What I have to do so that every VBA
procedure works with every Excel version ?
Thanks ahead for your help!

Gérard




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default VBA Refrerences which interfere

Chip and Tom,
Thanks a lot!

Gérard


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
Named ranges interfere with simple formulas RoyWollen Excel Discussion (Misc queries) 2 September 30th 06 10:53 PM
Textboxes interfere with each other ... :( Matt[_33_] Excel Programming 2 October 25th 05 07:42 PM
activeX interfere with chart Avi Excel Programming 0 October 21st 05 09:55 PM
Do macro shortcuts interfere with excel hotkeys? Devaryeh Excel Discussion (Misc queries) 2 December 15th 04 10:47 PM
Does Outlook interfere with Excel memory assignments? cogent Excel Programming 2 May 7th 04 10:54 PM


All times are GMT +1. The time now is 12:29 PM.

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

About Us

"It's about Microsoft Excel"