Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Running VBA with an Older Version of Excel

  Asked By: Misty    Date: Nov 08    Category: MS Office    Views: 918
  

I created a program (VBA) using mostly Office 2000 and 2003. I have
referenced 10.0 Excel Library.

The computer that will be running the program has 9.0 Excel Library,
and it doesn't work on that computer.

Is the solution as simple as just updating to the 10.0 Library to that
computer?

Share: 

 

4 Answers Found

 
Answer #1    Answered By: Eshe Chalthoum     Answered On: Nov 08

I use a contruction like this:

#If EarlyBinding = 1 Then
Public objWord As Word.Application
Public objDoc As Word.Document
Public objMerge As Word.Document
#Else
Public objWord As Object
Public objDoc As Object
Public objMerge As Object

Public Const wdFormLetters = 0
Public Const wdMainAndDataSource = 2
Public Const wdMainAndSourceAndHeader = 4
Public Const wdSendToNewDocument = 0
Public Const wdDoNotSaveChanges = 0
#End If

Where EarlyBinding is a compiler option in the project properties
(Tools/Properties for ...). When I develop I use EarlyBinding = 1 and have a
reference to the, in this case, version  of Word on my computer. You have all
the method and properties with intellisense at your disposal. When
delivering the app I erase the references and set the compiler option to
EarlyBinding = 0. And voila, no changes to the code because of the public
declarations (object and constants) and RUN!

 
Answer #2    Answered By: Waggoner Fischer     Answered On: Nov 08

It saved me ton's of
work in getting a spreadsheet setup so that multiple "flavors" of Outlook can
use it!

 
Answer #3    Answered By: Davi Costa     Answered On: Nov 08

I am losing it right now and can't figure where or how to use this
code in my workbook. I have a problem where one user has Outlook XP
and another has Outlook 2003.

When I include this early/late binding, do I still include a
reference to the Outlook library?

 
Answer #4    Answered By: Sydney Thompson     Answered On: Nov 08

No, you won't include the reference if you use Late
Binding.

 
Didn't find what you were looking for? Find more on Running VBA with an Older Version of Excel Or get search suggestion and latest updates.




Tagged: