Solved

Porting VBA to office mac

Posted on 2012-12-27
4
832 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
  • 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

Independent Software Vendors: 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

Suggested Solutions

Title # Comments Views Activity
Pivot Table Creation with refrence value another sheet 5 25
split data by day 21 35
Hash on Excel 13 44
Import CSV with All modify groups 17 47
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
With User Account Control (UAC) enabled in Windows 7, one needs to open an elevated Command Prompt in order to run scripts under administrative privileges. Although the elevated Command Prompt accomplishes the task, the question How to run as script…
This video shows the viewer how to set up and create Footnotes in their document. Click on the References tab: Select "Insert Footnote": Type in desired text:
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…

730 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