# Microsoft Office Application Help - Excel Help forum > For Other Platforms(Mac, Google Docs, Mobile OS etc) >  > [SOLVED] Excel 2011 on Mac VBA Macro help works on PC will not on mac.

## frisbie17

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.
```

----------


## JosephP

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

----------


## frisbie17

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

----------


## JosephP

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.
```

----------


## frisbie17

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

----------


## JosephP

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

----------


## frisbie17

Works.  Thank you so very much!  :-)

----------


## JosephP

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 ;-)

----------


## Cutter

@ 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.

----------

