?
Solved

Porting VBA to office mac

Posted on 2012-12-27
4
Medium Priority
?
928 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 1500 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 46

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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Microsoft Office Picture Manager was included in Office 2003, 2007, and 2010, but not in Office 2013. Users had hopes that it would be in Office 2016/Office 365, but it is not. Fortunately, the same zero-cost technique that works to install it with …
Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

862 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