Trying to get my Excel VBA code to compile & run on a Mac with most recent MS Office

  • So I've written a routine for customers, and those with Macs are not able to run it. It works flawlessly on PCs. Don't have a Mac myself to test on, which doesn't help. I've Googled this quite a bit and can't seem to figure it out. Here is what the error message on their Mac says:


    Compile Error: User-defined type not defined (modPanda 8:4)


    So the module is obviously called "modPanda" and I think the "8:4" references screen coordinates for the offending code (line 8 column 4). Not sure if I'm even right on that. At first I thought there could be a missing library reference or something, but I think the error message would state such instead of just being a compile error, no?


    In any case, the code on line 8 is the first line of code in the module, just declaring a string variable:


    Dim sFileName As String


    And I've placed the full code below (two subroutines contained in the same module). Would certainly appreciate if someone could point me in the right direction here. Is there an issue in my code? A potential issue with a setting on their Mac? I'm told that the client has the "latest" version of Excel for Mac if that matters. Thanks!


    I have posted this on another forum here:http://www.mrexcel.com/forum/e…trouble-figuring-out.html


  • Re: Trying to get my Excel VBA code to compile & run on a Mac with most recent MS Off


    Please do not mix color tags with code tags, as you can see it makes the code more difficult to read and useless for copying. Also, it is unnecessary.

  • Re: Trying to get my Excel VBA code to compile & run on a Mac with most recent MS Off


    I don't believe that Mac Excel supports Application.FileDialog.

    Rory
    Theory is when you know something, but it doesn’t work. Practice is when something works, but you don’t know why. Programmers combine theory and practice: nothing works and they don’t know why

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!