Excel Visual Basic macro doesn't work in OSX

vmottert

Registered

I have some software that is written in Excel that some advertising agencies use to buy radio and TV ad time. Most use PCs, but some use Macs. There were no problems running the software on Macs until OSX. One problem that I am having is ...

The software makes orders and a Visual Basic macro copies the orders out to an external Excel file. Then there is another macro - triggered by a keyboard shortcut - that opens an emial and attaches the order file to it. The email may then be addressed to the station represenative and sent. This email macro has not worked on the several Mac OSX machines that I have shown it on. There are no error messages - it just doesn't do anything.

The email macro was recorded so it's pretty simple. It is just recording the [ Send to / Email Recipient (as attachment) ] from the File menu. BTW, the [ Send to / Email Recipient (as attachment) ] works if done from the file menu. Just not in a macro.

And I even talked an OSX user through recording the macro on his OSX machine, giving it a keyboard shortcut, and trying it. It wouldn't even work that way. Also, the code that he recorded was the same as mine.

There are about a dozen other macros in the software and they all work fine under OSX.

Any insight into this appreciated. Thanks for your consideration.

I'll include the recorded macro below:
________________________

Sub SendEmail()
Application.Dialogs(xlDialogSendMail).Show
ActiveWorkbook.Close False
End Sub
________________________

Regards,

Vernon
 
Without access to the code in the VBA macro, I'm left to speculate that it uses file access routines make assumptions about the structure of the file system that are not true in MacOS X.
 
Thanks, MM.

The macro code is included at the end of my first note above and it's pretty simple. I wondered about your point but I don't think there is any difference in the file menu structure for this command between Win XP and OSX. It is: "File / Send to / Mail recipient (as attachment)" in both OSs.

Also, note that I had one user record the code on his own OSX Mac and give it a keyboard combination. Even the code recorded on OSX did nothing. Although the email command worked from the OSX File menu.

Regards,

Vernon
 
You are talking about the similarity in the commands. I am talking about the differences in File. In Windows, your full pathname is something like "C:\MyDocuments\DocumentDirectory\MyFile.doc." On the Mac, your full pathname is something like "/Users/myaccount/Documents/DocumentDirectory/MyFile.doc." My point is that your VPA macro may not understand the UNIX-style pathnames of MacOS X.
 
Back
Top