Excel VBA for Mac - compatibility and Windows API

iliace

Well-known Member
Joined
Jan 15, 2008
Messages
3,548
Office Version
  1. 365
  2. 2016
  3. 2010
Platform
  1. Windows
Hi everyone,

I have some budget tools that we run in our organization using Excel. Some of these are heavily macro-driven, and to further complicate things, some of those use Windows API to achieve some of the functionality. I recently discovered that a large number of users in our company are using some kind of Mac-based system, with the corresponding version of Office for Mac installed. This was news to me. This created huge compatibility headaches for our users, as they were not able to use their own workstation to run our tools, and had to line up at a limited number of Windows workstations to complete the Budget process.

I have not yet been able to get a Mac-based workstation to test some of our tools, so I don't know all of the specifics, but want to see if anyone has any insight into cross-platform development and porting Windows-reliant spreadsheets to Mac versions of Excel.


Problem #1: some of our tools rely on Windows API. We are using libraries such as kernel32.dll, user32.dll, shfolder.dll, and advapi32.dll. My assumption is that none of this works on Mac operating systems. Is there some equivalent of achieving these functions (GetUserName, GetComputerNameEx, GetSystemMetrics, SHGetFolderPath, etc) to recover some of this functionality? We can definitely nix some of it, but certain ones would be hard to live without, given our current setup, without reinventing the wheel.

Problem #2: this one is less of a concern, but are there any known VBA compatibility issues, using strictly built-in VBA and Excel object model, when porting Windows version to Mac? Particularly curious whether VBA Forms would still work.

Problem #3: even less of a concern, but are there any known compatibility issues with native Excel functions, when porting Windows to Mac? I am interested in a broad range of things, from worksheet functions to Worksheet properties (e.g. protection), to file formats, and so on.


If anyone has any insight, or if there are online/book resources available that address these issues, I would love to know!

Thank you for looking, and thanks in advance for any help or advice.
 
Last edited:

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Re #1, it is possible to call some APIs on a Mac but there is no definitive list anywhere that I know of and it's definitely not supported officially.
 
Upvote 0
Thank, guys.

It looks like we will have to play this one by ear.
 
Upvote 0

Forum statistics

Threads
1,215,133
Messages
6,123,233
Members
449,092
Latest member
SCleaveland

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top