+ Reply to Thread
Results 1 to 14 of 14

Running simple code in Mac OS (10.8.3) with Excel for Mac 2011 (v14.3.2)

  1. #1
    Registered User
    Join Date
    07-24-2011
    Location
    Ottawa
    MS-Off Ver
    Excel 2007
    Posts
    91

    Running simple code in Mac OS (10.8.3) with Excel for Mac 2011 (v14.3.2)

    I thought Excel for Mac 2011 was vba-enabled?

    Would someone please take a look at my simple code (in module 1) and the attached error message and let me know what I'm doing wrong? It is running fine on Windows but not on Mac OS.

    Would there be a way to adapt my code so that it can be ran on a Mac?

    Many thanks in advance.

    ESL CO windows.xlsm
    Screen Shot 2013-04-23 at 7.21.42 PM.png
    Screen Shot 2013-04-23 at 7.22.07 PM.jpg

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

    Re: Running simple code in Mac OS (10.8.3) with Excel for Mac 2011 (v14.3.2)

    the scripting runtime library does not exist on macs so you can't use it-you would need to create your own class equivalent. searching google for mac vba hashtable will find some possible options for you
    Josie

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

  3. #3
    Registered User
    Join Date
    07-24-2011
    Location
    Ottawa
    MS-Off Ver
    Excel 2007
    Posts
    91

    Re: Running simple code in Mac OS (10.8.3) with Excel for Mac 2011 (v14.3.2)

    Thanks Joseph. I'm not sure I understand what you mean but I get that my code needs to be modified...

    Given that my code is short, would any generous soul be willing to re-write it so that it would work on both Mac and Windows platforms?

    Thanks.

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

    Re: Running simple code in Mac OS (10.8.3) with Excel for Mac 2011 (v14.3.2)

    your code will not be short once rewritten since you will require a class to replace the dictionary object. if you search as I suggested you should find ready made code replacements

  5. #5
    Registered User
    Join Date
    07-24-2011
    Location
    Ottawa
    MS-Off Ver
    Excel 2007
    Posts
    91

    Re: Running simple code in Mac OS (10.8.3) with Excel for Mac 2011 (v14.3.2)

    Would there be a way to circumvent the "dictionary" approach used in the current code with an equivalent procedure which Mac could handle? This code was written by someone else so I'm not familiar with "how" it works.

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

    Re: Running simple code in Mac OS (10.8.3) with Excel for Mac 2011 (v14.3.2)

    I will try and have a look at it this evening

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

    Re: Running simple code in Mac OS (10.8.3) with Excel for Mac 2011 (v14.3.2)

    I've added a Hashtable class which should work in windows and mac versions and altered your code to use it
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    07-24-2011
    Location
    Ottawa
    MS-Off Ver
    Excel 2007
    Posts
    91

    Re: Running simple code in Mac OS (10.8.3) with Excel for Mac 2011 (v14.3.2)

    Amazing. Seems to work fine in Windows. I will test on my Mac tonight and let you know.
    Thank you so much for your help Joseph.

    Olivier

  9. #9
    Registered User
    Join Date
    07-24-2011
    Location
    Ottawa
    MS-Off Ver
    Excel 2007
    Posts
    91

    Re: Running simple code in Mac OS (10.8.3) with Excel for Mac 2011 (v14.3.2)

    Works like a charm on Mac too. Thanks so much Joseph.

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

    Re: Running simple code in Mac OS (10.8.3) with Excel for Mac 2011 (v14.3.2)

    you're welcome :-)

  11. #11
    Registered User
    Join Date
    07-24-2011
    Location
    Ottawa
    MS-Off Ver
    Excel 2007
    Posts
    91

    Re: Running simple code in Mac OS (10.8.3) with Excel for Mac 2011 (v14.3.2)

    How can I mark as solved?

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

    Re: Running simple code in Mac OS (10.8.3) with Excel for Mac 2011 (v14.3.2)

    use the 'thread tools' link at the top of the page

  13. #13
    Registered User
    Join Date
    07-24-2011
    Location
    Ottawa
    MS-Off Ver
    Excel 2007
    Posts
    91

    Re: Running simple code in Mac OS (10.8.3) with Excel for Mac 2011 (v14.3.2)

    Not working. I only have: show printable, email to a friend, unsubscribe, add a poll...

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

    Re: Running simple code in Mac OS (10.8.3) with Excel for Mac 2011 (v14.3.2)

    oh-I think too much time has passed and you need to ask a moderator to do it

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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