none
Excel PC VBA code to Excel Mac VBA Code RRS feed

  • Question

  • Is there a utility that will open a .xlsm file from a pc and identify which lines of code that will need to be modified to run on the Mac Excel version?
    Monday, August 22, 2016 12:26 AM

Answers

  • No, you have to test the file on different platforms by yourself.

    Andreas.

    Monday, August 22, 2016 10:18 AM
  • Just to add, before testing head all modules Option Explicit and fully declare all variables. In Windows test with Debug/Compile and fix anything that fails to compile. Open the in Mac and do Debug/Compile again, it will flag things you need to change. Then adapt with

    #If Mac  Then
     ' code lines or entire routines for Mac
    #Else
    ' Windows only code
    #End If

    That will pick up most things but you still need to test every aspect of your project. There may be other things that don't work as expected in Mac, cater for these as appropriate with #If Mac etc

    Monday, August 22, 2016 11:59 AM
    Moderator

All replies

  • No, you have to test the file on different platforms by yourself.

    Andreas.

    Monday, August 22, 2016 10:18 AM
  • Just to add, before testing head all modules Option Explicit and fully declare all variables. In Windows test with Debug/Compile and fix anything that fails to compile. Open the in Mac and do Debug/Compile again, it will flag things you need to change. Then adapt with

    #If Mac  Then
     ' code lines or entire routines for Mac
    #Else
    ' Windows only code
    #End If

    That will pick up most things but you still need to test every aspect of your project. There may be other things that don't work as expected in Mac, cater for these as appropriate with #If Mac etc

    Monday, August 22, 2016 11:59 AM
    Moderator