Hi I am using an excel file running a vba macro. The macro code works fine on my windows pc but it doesn't work on my Mac although I have enable all macros from excel preferences.
Anyone could help??
Thank you
Anyone could help??
Thank you
@MARK858 My understanding was that Macs use Visual Studios, which does not support visual basic. Im not a Mac user, so I checked with multiple sources before posting the link. If this is incorrent, sorry for misleading the thread.@dermie_72 that link is about Visual Basic (VB) and Visual Studio not Visual Basic for Applications (VBA).
@damav78 you'll need to post your code before anyone can give an answer without guessing
Hi, and sorry for late response. This code was made by a user of this forum in order to help me.Visual Basic and Visual Basic for Applications are not the same, the question is about Visual Basic for Applications. Visual Basic for Applications runs on a Mac but there are some differences to the version that runs on Windows (in general some options don't exist), which is why the OP should post the code that they are using.
What do you mean in what module do I have the code? As I told you, this code was made by a user who help me in this forum. I have 0 knowledge on codes etc.There is nothing I can see in that code that looks Windows specific (can't test at the moment as don't have a Mac with me).
- What module do you have the code in?
- Is the macro firing (if not sure put a message box as the first line of the code and change the value in cell B8 manually and see if you get the message)? if it isn't try putting the file in a Trusted Location and change B8 again.
- How did you "transfer the file"?
- Do you get an Error message? if yes what exactly does it say
There are 4 main types of module a regular module where the majority of code goes, a worksheet module (where this code should go), a Workbook module and a Class module. Please note the way this is written seems very abrupt for a legitimate question by someone who is trying to help you.What do you mean in what module do I have the code? As I told you, this code was made by a user who help me in this forum. I have 0 knowledge on codes etc.
If you have transferred it from iCloud then your macro's might be blocked on the file and might have triggered the "Errors were detected while saving" message, if you transferred from a desktop with a memory stick then it is unlikely to get blocked.I transfer the file between windows and Mac with file transfer from anydesk or I iCloud
Then try copying and pasting the code (preferably via a text file) from the file on the Windows machine into the Sheet code window and test (btw this answers the question I asked about which module the code is in) and test.when I right click on my Mac the sheet that normally has the code, the window is empty!! I don't see the code written like in my windows pc