Different VBA versions

  • Thread starter Thread starter Tommi
  • Start date Start date
T

Tommi

Hello!
I have made a program with Excel 2002 SP-2 (Visual Basic version 6.3). The
program will be used in Excel 97 SR-2 (don't know the Visual Basic version,
because Help/About Microsoft Visual Basic doens't tell anything)
I just tried to get the prorram to work in Excel 97, but it didn't. There is
probably some version differences with Visual Basic. Can somebody help me
with following questions:
1) Is there always specific Visual Basic version with specific Excel version
or can same Excel version have different versions of Visual Basic in some
cases?
2) Is there somewhere list about differences with these Visual Basic
versions which I am working?
3) Do you have good suggestions what I should do? Is the only answer to
manually check all the code through so that it works with older Visual Basic
version?


Thanks very much!

BR,
Tommi
 
It is usually best to programme in the *earliest* version that will be
used.

Excel is supposed to be backwards compatible, but can never be forwards
compatible.
 
Hi Tommi

Excel 97 : VB5
Excel 2000 up for Windows: VB6
Excel Macintosh: VB5

Basically yes, you have to make sure your code works in VB5, or code
separate procedures depending on VB version. One way to check that is

#If VBA6 Then
'something VB6 spesific
#Else
'something else
#End If

The most common problems running 2000 code on 97 is modeless userforms
(unsupported in Excel97) and a few string manipulations like Split() and
InstrRev. There are workarounds for all this, so start checking where your
code fails.

This said: Always develop on the oldest version, or you're working
blindfolded. Get your hands on a copy of Excel97 before you continue.
 
Back
Top