+ Reply to Thread
Results 1 to 6 of 6

VBA-Excel for Mac

  1. #1
    Forum Contributor IonutC's Avatar
    Join Date
    01-28-2016
    Location
    Bucharest, Romania
    MS-Off Ver
    Office 2019
    Posts
    486

    VBA-Excel for Mac

    Hi guys,

    Just a quick one. There is a difference between Excel on Mac and on WIndows?
    I know how to do programming on Windows, but i think that on MAc, maybe there are other differences in the VBA field.

    If so, can someone please show me a guide on what is difference in the VBA code is? or some docs that show the delta?

    Thank you,
    Ionut
    Please consider:
    Be polite. Thank those who have helped you.
    Click the star icon in the lower left part of the contributor's post and add Reputation. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .
    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    Posting code between tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: VBA-Excel for Mac

    VBA that works within Excel is the same. Sorry if this obvious, but it is the VBA codes that reach outside of the Excel scope to operate that are different. The simplest example is selecting a file on the hard drive.

    This is a standard module I add for clients that need both MAC and PC. The functions do the same thing, provide a popup for selecting a file for some other reason, usually to open or import...
    Please Login or Register  to view this content.
    Then, in the main macros, I test for the OS of the computer running the macro, then call the appropriate version:
    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Contributor IonutC's Avatar
    Join Date
    01-28-2016
    Location
    Bucharest, Romania
    MS-Off Ver
    Office 2019
    Posts
    486

    Re: VBA-Excel for Mac

    ok thank you JB!

  4. #4
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: VBA-Excel for Mac

    Hi,

    There are also syntax differences with VBA within Excel too, such as parameters that don't apply on the Mac (e.g. SearchFormat in the Find method). Additionally ActiveX controls don't work at all; API calls may or may not work but will definitely require rewriting; there is sandboxing on the Mac to work around too. All of this also varies between Mac versions.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  5. #5
    Forum Contributor IonutC's Avatar
    Join Date
    01-28-2016
    Location
    Bucharest, Romania
    MS-Off Ver
    Office 2019
    Posts
    486
    Quote Originally Posted by xlnitwit View Post
    Hi,

    There are also syntax differences with VBA within Excel too, such as parameters that don't apply on the Mac (e.g. SearchFormat in the Find method). Additionally ActiveX controls don't work at all; API calls may or may not work but will definitely require rewriting; there is sandboxing on the Mac to work around too. All of this also varies between Mac versions.
    Thank you xlnit! Where can i find some documentation about this? Have a great day!

  6. #6
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: VBA-Excel for Mac

    I am not aware of any official documents- Ron de Bruin's website is very useful though.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1