Excel 2004 & Visual Basic - Compatibilitywith Leopard OS/Intel Processor

D

Daveyne

Version: 2004
Operating System: Mac OS X 10.5 (Leopard)
Processor: Intel

I just took the leap and switched from PC to MAC. When I bought my new macbook pro, I also bought excel 2008, which I discovered quickly does not support visual basic. Many of my spreadsheets contain visual basic macros and I must find a solution to this problem. I'm thinking about buying excel 2004, which I understand has visual basic support, but don't want to be burned twice.

Can anyone tell me for sure whether I will be able to use the visual basic in excel 2004, including recording macros, on my system?
 
J

JE McGimpsey

Version: 2004
Operating System: Mac OS X 10.5 (Leopard)
Processor: Intel

I just took the leap and switched from PC to MAC. When I bought my new
macbook pro, I also bought excel 2008, which I discovered quickly does not
support visual basic. Many of my spreadsheets contain visual basic macros and
I must find a solution to this problem. I'm thinking about buying excel 2004,
which I understand has visual basic support, but don't want to be burned
twice.

Can anyone tell me for sure whether I will be able to use the visual basic in
excel 2004, including recording macros, on my system?

XL04 will both run and record VBA Macros. All Mac VBA versions (at least
until the next one) are at VBA 5, though (the same as WinXL97) so there
are some VBA 6 functions (e.g., Replace, Join, Split, etc.) that aren't
implemented, and, of course, you can't use Windows API calls.

The workarounds for that are easy. I use an add-in that implements the
newer functions in VBA5, so that no modification needs to be made to the
WinXL code.

Alternatively, you can rewrite code that's conditionally compiled, so
that, for instance, Replace is used in WinXL, but the worksheet function
SUBSTITUTE() is used in MacXL:

#If Mac Then
s2 = Application.WorksheetFunction.Substitute( _
s1, "replace_this", "with_that")
#Else
s2 = Replace(s1, "replace_this", "with_that")
#End If

There are a couple of other minor differences (including MacXL
supporting the MacScript() command), but it shouldn't be too hard to use.
 
J

Jim Gordon MVP

JE said:
XL04 will both run and record VBA Macros. All Mac VBA versions (at least
until the next one) are at VBA 5, though (the same as WinXL97) so there
are some VBA 6 functions (e.g., Replace, Join, Split, etc.) that aren't
implemented, and, of course, you can't use Windows API calls.

The workarounds for that are easy. I use an add-in that implements the
newer functions in VBA5, so that no modification needs to be made to the
WinXL code.

Alternatively, you can rewrite code that's conditionally compiled, so
that, for instance, Replace is used in WinXL, but the worksheet function
SUBSTITUTE() is used in MacXL:

#If Mac Then
s2 = Application.WorksheetFunction.Substitute( _
s1, "replace_this", "with_that")
#Else
s2 = Replace(s1, "replace_this", "with_that")
#End If

There are a couple of other minor differences (including MacXL
supporting the MacScript() command), but it shouldn't be too hard to use.

Hi Jon,

Where can I get that add-in?

Thanks.

-Jim
 
D

Daveyne

Thanks so much for the info! I would be interested in knowing where to get this add-in as well...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top