ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Different VBA versions (https://www.excelbanter.com/excel-programming/284248-different-vba-versions.html)

Tommi[_2_]

Different VBA versions
 
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



BrianB

Different VBA versions
 

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.


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/

~~Now Available: Financial Statements.xls, a step by step guide to creating financial statements

Harald Staff

Different VBA versions
 
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.
--
HTH. Best wishes Harald
Followup to newsgroup only please

"Tommi" skrev i melding
...
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






All times are GMT +1. The time now is 08:59 AM.

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