Solved

Porting VBA to office mac

Posted on 2012-12-27
4
743 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
Comment Utility
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
Comment Utility
I thought that VBA wasn't supported in the MAC environment.
0
 

Assisted Solution

by:gbergsma
gbergsma earned 0 total points
Comment Utility
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
Comment Utility
My solution is more comprehensive for a full PC/Mac issues list
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

This is pretty cool.  The purpose of this VB Script is to help you document where JAR (Java ARchive) files and specifically java class files are located so that you can address issues seen with a client or that you can speak intelligently with a dev…
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 …
This video walks the viewer through the process of creating envelopes and labels, with multiple names and addresses. Navigate to the “Start Mail Merge” button in the Mailings tab: Follow the step-by-step process until asked to find the address doc…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …

744 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

15 Experts available now in Live!

Get 1:1 Help Now