Solved

Porting VBA to office mac

Posted on 2012-12-27
4
861 Views
Last Modified: 2013-02-21
Hi,

I have Excel/Word VBA code that I want to run on a Mac (running Office for Mac).

I have found the following items are missing when trying to compile on the Mac:
1. msoFileDialogFolderPicker
    code:
    Dim FD As FileDialog
    Set FD = Application.FileDialog(msoFileDialogFilePicker)

2. Application.SpellingOptions.UserDict
    code:     Application.SpellingOptions.UserDict = SpellingDictionary
    where SpellingDictionary has a full path of the dictionary file
3. msoLanguageIDEnglishAUS
    code: Application.SpellingOptions.DictLang = msoLanguageIDEnglishAUS

I am hoping (perhaps in vain) that VBA under a Mac isn't too cobbled

If anyone can let me know how I get over these problems that would be great

Cheers

bergsy
0
Comment
Question by:gbergsma
[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
  • 2
4 Comments
 
LVL 43

Accepted Solution

by:
Steve Knight earned 500 total points
ID: 38727586
Only quick comment out of interest for the proper answer as much as anything. I don't have a Mac these days to test on myself, but I wondered if you could use application.GetOpenFilename as I'm sure I used that before in one that worked on both a few years back, otherwise you've got to write different functions to support either.  If that dialog will do what you need then great.  Did a quick search which seems to say this does work.

http://www.realgeek.com/forums/how-to-display-common-file-dialogs-344485.html

But this guy seems to have done the work for you getting you a windows / mac filenames, which kind of infers that the above doesn't work.

http://nhcuong.wordpress.com/2012/03/27/use-an-open-file-dialog-in-vba-with-both-mac-and-windows/

So interested which does work for you so I know the next time I get a Mac user to support.

Not used either of the others when working on Mac VBA so not sure without one in front of me sorry.

Steve
0
 
LVL 45

Expert Comment

by:aikimark
ID: 38728589
I thought that VBA wasn't supported in the MAC environment.
0
 

Assisted Solution

by:gbergsma
gbergsma earned 0 total points
ID: 38897799
I found the link below which seems to be pretty comprehensive:

http://www.rondebruin.nl/mac.htm

I have decided it is too much work to create a code base that will support both, so going to run VmWare on the Mac
0
 

Author Closing Comment

by:gbergsma
ID: 38913155
My solution is more comprehensive for a full PC/Mac issues list
0

Featured Post

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
I was prompted to write this article after the recent World-Wide Ransomware outbreak. For years now, System Administrators around the world have used the excuse of "Waiting a Bit" before applying Security Patch Updates. This type of reasoning to me …
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

705 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