×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Running Windows VBA on Excel 2011 (Macintosh)

Running Windows VBA on Excel 2011 (Macintosh)

Running Windows VBA on Excel 2011 (Macintosh)

(OP)
I have a complex spreadsheet that makes extensive use of VBA, including Command Buttons and Event Handlers.  I have developed it over quite a few years, and therefore quite a few versions of Excel, but only ever on Windows versions of Excel.  It is able to be run on all Excel versions from 97 to 2010.

I have had a request to provide a version for the recently released Macintosh version of Excel, 2011.  The marketing material for Excel 2011 claims that it provides full support for VBA, and if this is truly the case then the conversion task should be trivial.
 
Does anyone have any experience converting a VBA-ridden Windows-based Excel spreadsheet to Excel-2011?  What sort of difficulties were encountered?

Alternatively, is anyone aware of a document somewhere on the Internet that gives an impartial and independent review of the degree of interchangeability between the two platforms?

[I posted this query on the Tek-Tips site a week ago, where it elicited nary a response.]

RE: Running Windows VBA on Excel 2011 (Macintosh)

I don't, but if it supposedly supports VBA, then there ought not be a problem, unless there are Windows or DOS specific commands.

TTFN
FAQ731-376: Eng-Tips.com Forum Policies

RE: Running Windows VBA on Excel 2011 (Macintosh)

(OP)
I got a brief chance to test my spreadsheet on a Mac when I was at a social function last night.  I just happened to have it on a memory stick in my pocket, and while my wife was distracted I turned antisocial and fired up our host's Mac.

Results, such as they were, were very discouraging.  In the couple of minutes I had before my absence was noticed I discovered:

(1)  The "welcome" form that fires up when the spreadsheet is opened is supposed to close itself down automatically after 5 seconds, unless the user closes it earlier.  On Mac the auto closedown did not work.

(2)  None of the command buttons responded in any way when clicked upon.

(3)  However I was able to initiate the running of VBA code with my ctrl-shift-X style shortcuts.

(4)  Some (maybe all?) reserved constants such as xlPending caused "variable undefined" errors.

I had no time to look into workarounds for these before being led by the ear back to the gathering.  However I was unhappy with the experience, and will probably decline the request to produce a Mac version of the spreadsheet.  (One of the conditions I imposed on myself was that the same version of the spreadsheet be able to run on both platforms, because I am not at all interested in having to maintain two versions.  My conclusion from my brief experience suggests that even if I was to put in the effort to get a Mac version working, the result would not work when ported back to Windows.)

Despite this, I am still interested in unearthing any succinct document about the difficulties I might encounter were I to attempt the conversion.
 

RE: Running Windows VBA on Excel 2011 (Macintosh)

There are apparently some differences between the object model in the Windows and Mac versions of Excel.

You might have better luck asking this question over at Tek-Tips.  http://www.tek-tips.com/threadminder.cfm?pid=707

A Google search of

excel object model windows mac

would also lead you in the right direction.

RE: Running Windows VBA on Excel 2011 (Macintosh)

i've the same problem for some files, but not all.  in some cases, opening early version of excel w/ vba file in osx results in the vba modules being completely removed from the file - no vba modules whatsoever.

i found this webpage today:

http://answers.microsoft.com/en-us/mac/forum/macoffice2011-macexcel/need-help-converting-a-vba-macro-from-windows/f375de24-14d2-4ad1-b003-b931a7a8f5d0?tab=MoreHelp

this webpage claims an answer, but one must register:

http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_27657973.html

not much help . . .
-pmover

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources