Solved

Converting Excel Macros to run on APPLE MACINTOSH

Posted on 2012-04-01
6
3,076 Views
Last Modified: 2012-04-05
I have a HUGE Excel VBA Macro that was written under Windows. It reads in a CSV file,  changes the content, then writes out a new CSV. Sometimes it reads in .JPG files just to check if they exist. No databases.
NOW I want to run it on a Mac using "Excel for Mac" under OS/X, and not using Parallels, VMware, etc.
SOOOOOO does anybody know what is needed to convert Excel VBA from Windows to MAc/OSX?   Offhand the only change I can think of is to change all the "C:" to "Macintosh HD" but I am SURE there is more to it.
OR is the a Converter, or does Excel MAC know how to open & use Macros from an Excel WINDOWS?
-------------------------------------------------------------------
Note: Orig Excel VBA/Macro written for Windows XP and Microsoft Office 2000  But runs on most Excel versions.  Mac has Excel for Mac 2008 but will upgrade if needed.
0
Comment
Question by:bleggee
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 48

Expert Comment

by:Martin Liss
ID: 37794431
Are you aware that you can run any version of Windows (including all windows software) as a virtual machine on the MAC? I use a piece of software called Parallels and it allows me to seamlessly run Windows XP side by side with Lion.
0
 
LVL 9

Expert Comment

by:suvmitra
ID: 37794455
As you do not want any VM or Parallels I think of only the below steps.

Apple's spreadsheet application, Numbers, can't read macros that are written in VBA.

Consider,

* Use AppleScript to create your spreadsheet macros. This is the built-in Mac OS X scripting language. All iWork '09 applications, including Numbers, support the use of AppleScript.

* Switch to using the previous version of Excel for Mac. Excel 2004 supports the use of VBA macros.

* Convert your Numbers '09 spreadsheet to a Windows Excel spreadsheet format. Open your Numbers spreadsheet, and click "File," then "Save As." Select "Save copy as," and choose Excel Document from the pop-up menu. You can now apply macros to the spreadsheet by opening the spreadsheet with a Windows version of Excel.
0
 
LVL 1

Author Comment

by:bleggee
ID: 37794500
Suvmitra - Good idea ... I would gladly downgrade to Excel for Mac 2004 if that will do the trick with minimal code changes. I'll check ebay/craigslist too see if I can buy a 2004 version.

Martin -thx for the tip ... yes we are running it now using VMware. looking for a 100% Mac solution - long story :-)
0
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
LVL 40

Accepted Solution

by:
Eoin OSullivan earned 250 total points
ID: 37794858
bleggee - The latest version of Excel as part of Office 2011 on the Mac has full support for VBA scripts.
Office 2008 on OSX did not have VBA support but it was restored in 2011 so I'd not recommend downgrading to 2004 ... just don't use 2008.

You will only need to look at file/folder paths as these are different on OSX

I think all the Excel 2011 VBA examples you'd want are well demonstrated here
http://www.rondebruin.nl/mac.htm

See this previous EE post which the user had a related issue
http://www.experts-exchange.com/Software/Office_Productivity/Office_Suites/MS_Office/Excel/Q_27599388.html
0
 
LVL 85

Assisted Solution

by:Rory Archibald
Rory Archibald earned 250 total points
ID: 37794862
I would upgrade rather than downgrade if you can - Excel 2011 VBA is a bit closer to Windows versions as it is, in name at least, VBA6 rather than VBA5 (VBA5 is what Office 97 had). There is no converter that I am aware of - you'd have to either post the code or debug it yourself, I think.
0
 
LVL 48

Expert Comment

by:Martin Liss
ID: 37796506
Oh, I'm sorry, I missed the part where you said that you didn't want to use Parallels.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question