MAC and Windows

K

Karen Field

I want to create a template using the Windows version of
Excel, but it will also be used on Macs. The template
will include VBA code. Is the VBA in Macs the same as
Windows? Are formulae the same too?

Thanks!
 
B

Bernard Rey

Karen Field wrote :
I want to create a template using the Windows version of
Excel, but it will also be used on Macs. The template
will include VBA code. Is the VBA in Macs the same as
Windows? Are formulae the same too?

Mostly yes. But you should know that the VBA version in all the Mac versions
is VBA5 (the latest Windows versions have a VBA6 version) and that the
"ActiveX" controls are not supported on the Mac. There are some other
"Windows" only features, but not that many. And it's often mentioned in the
HelpFile. If you stay away from these, it should work fine.

Oh, yes, don't forget that the "PathSeparator" is different..
 
K

Karen

Bernard Rey said:
Karen Field wrote :


Mostly yes. But you should know that the VBA version in all the Mac versions
is VBA5 (the latest Windows versions have a VBA6 version) and that the
"ActiveX" controls are not supported on the Mac. There are some other
"Windows" only features, but not that many. And it's often mentioned in the
HelpFile. If you stay away from these, it should work fine.

Oh, yes, don't forget that the "PathSeparator" is different..

Hi Thanks for that.

This may sound daft, but what's "PathSeparator"?
 
K

Karen

Hi Bernard

Thanks for that - if I had really thought about it I would've known
what path separator was (though wouldn't have known that Macs use ":"
This'll be a bit tricky as I need to use file paths in my template -
oh well, nothing is ever easy!

Thanks for the links - the info will be extremely useful :)
 
J

J.E. McGimpsey

Thanks for that - if I had really thought about it I would've known
what path separator was (though wouldn't have known that Macs use ":"
This'll be a bit tricky as I need to use file paths in my template -
oh well, nothing is ever easy!

It's not so hard to deal with path separators - XL has a built-in
property that will adjust for the OS, e.g.:

fname = "mynewfile.xls"
With ThisWorkbook
.SaveAs FileName:= .Path & Application.PathSeparator & fName
End With

saves the file with the name mynewfile.xls in the current workbook's
directory, using "\" as the separator for windows and ":" for mac.
 
K

Karen

Hi,

Just the ticket!

Thanks to both yourself and Bernard for all your help - greatly appreciated.

Karen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top