+ Reply to Thread
Results 1 to 9 of 9

Excel 2011 on Mac VBA Macro help works on PC will not on mac.

  1. #1
    Registered User
    Join Date
    06-27-2012
    Location
    othseco correct
    MS-Off Ver
    Excel 2010
    Posts
    37

    Excel 2011 on Mac VBA Macro help works on PC will not on mac.

    I have the VBA code below that works on my windows machine but will not run on my mac. I need to adjust it so it will works on both platforms. I am running Lion and Excel 2011 for mac. Can anybody help. Here is the code.

    Please Login or Register  to view this content.
    Last edited by Cutter; 07-26-2012 at 09:07 PM. Reason: Added code tags

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Excel 2011 on Mac VBA Macro help works on PC will not on mac.

    you can't use any scripting runtime objects on a mac-they're just not available. you need to either create your own class (there are several hashtable based classes you can find on the web) or use a Collection object instead
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Registered User
    Join Date
    06-27-2012
    Location
    othseco correct
    MS-Off Ver
    Excel 2010
    Posts
    37

    Re: Excel 2011 on Mac VBA Macro help works on PC will not on mac.

    Anybody out there willing to rewrite this for me? I am not very good in VBA.

  4. #4
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Excel 2011 on Mac VBA Macro help works on PC will not on mac.

    untested but insert a new class module in your project and call it Dictionary then paste in the code in the attached text file (too long to post here)

    then replace the
    Please Login or Register  to view this content.
    lines with
    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    06-27-2012
    Location
    othseco correct
    MS-Off Ver
    Excel 2010
    Posts
    37

    Re: Excel 2011 on Mac VBA Macro help works on PC will not on mac.

    Still having problems. Here is the entire file. Would you mind taking a look?
    Attached Files Attached Files

  6. #6
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Excel 2011 on Mac VBA Macro help works on PC will not on mac.

    needed a few more changes to the class. try this one
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    06-27-2012
    Location
    othseco correct
    MS-Off Ver
    Excel 2010
    Posts
    37

    Re: Excel 2011 on Mac VBA Macro help works on PC will not on mac.

    Works. Thank you so very much! :-)

  8. #8
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Excel 2011 on Mac VBA Macro help works on PC will not on mac.

    my pleasure.

    by the way when posting code on the forum you should use code tags as stated in the rules otherwise a moderator will chide you ;-)

  9. #9
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Excel 2011 on Mac VBA Macro help works on PC will not on mac.

    @ frisbie17

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, consider yourself chided!

    Please notice that code tags have been added to your post(s). The forum rules require them so please keep that in mind and add them yourself whenever showing code in any of your future posts. To see instructions for applying them, click on the Forum Rules button at top of the page and read Rule #3.
    Thanks.

+ 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