Solved

Porting VBA to office mac

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
Outlook Free & Paid Tools
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

813 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now