+ Reply to Thread
Results 1 to 18 of 18

Macros working fine on Windows (Excel 2010), but not on Mac (Excel 2011)

  1. #1
    Registered User
    Join Date
    07-01-2010
    Location
    United States
    MS-Off Ver
    Excel 2011 (Mac)
    Posts
    77

    Macros working fine on Windows (Excel 2010), but not on Mac (Excel 2011)

    Hi,

    I have a simple database file that contains an account master sheet, an account holdings master sheet, and an account view sheet for pulling in data from the other two and displaying it tidily. Macros are used to pull in holdings data when an account name is selected from the dropdown list on the account view sheet. In Excel 2010 running on Windows 7 Ultimate Service Pack 1, these holdings populate the sheet correctly when an account is selected from the dropdown. In Excel 2011 running on Mac OS X 10.7.2, however, selecting names from the dropdown causes only the account notes (blue fields in the upper half of the sheet) to populate correctly. The holdings (yellow lines across lower portion of the sheet) do not populate correctly on a Mac.

    Does anyone know why the Macros run and the account view sheet displays correctly on Windows, but not on a Mac? I am totally perplexed by this, as the code is the same. Are there any settings that need to be changed on the Mac? Is it some sort of display issue? I would love to have the file display correctly on a Mac with default Excel settings.

    I've attached the file in the hope that someone with access to both operating systems can test it and provide some insight. Thanks so much in advance for any help or advice.
    Attached Files Attached Files
    Last edited by six6to8eight; 01-28-2012 at 09:45 PM.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,164

    Re: Macros working fine on Windows (Excel 2010), but not on Mac (Excel 2011)

    Hi 6 to 8,

    You've attached an .xls file which is from the older 2003 Excel. Have you converted this to 2010 by saving it as an .xlsx or .xlsm and then running the code? I believe the 2011 Mac code is close to PC 2010. I have no idea if the 2011 Mac version can convert an .xls correctly.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    07-01-2010
    Location
    United States
    MS-Off Ver
    Excel 2011 (Mac)
    Posts
    77

    Re: Macros working fine on Windows (Excel 2010), but not on Mac (Excel 2011)

    Marvin,

    Thanks for the info. I just tried saving the .xls as an .xlsm Macro-Enabled Workbook on a Mac (2011), and am still having the same problem. However, it seems to me that your intuition is probably right. I'll play around with the other file formats.

    Might anyone else have any experience with these formats? I'll see what I can do on my own. Thanks again.

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,164

    Re: Macros working fine on Windows (Excel 2010), but not on Mac (Excel 2011)

    Hi,
    It might be important to know what line of code the 2011 hangs on. This might indicate a difference between VBA in the two versions.

  5. #5
    Registered User
    Join Date
    07-01-2010
    Location
    United States
    MS-Off Ver
    Excel 2011 (Mac)
    Posts
    77

    Re: Macros working fine on Windows (Excel 2010), but not on Mac (Excel 2011)

    It's been so long since I've done anything with VBA -- how do I identify what line it's hanging on? I've tried all the choices under the Debug menu (Step Into, Step Over, Run to Cursor, etc.), but I can't remember how to do it. Could you advise? The code runs when the account name dropdown box is changed by the user, so I'm not sure how to debug without actually changing the selection, if that makes sense...

  6. #6
    Forum Expert OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,655

    Re: Macros working fine on Windows (Excel 2010), but not on Mac (Excel 2011)

    Remove
    Please Login or Register  to view this content.
    from the change event of the Account View sheet and add
    Please Login or Register  to view this content.
    as the first line of the EF exit label.

    By the way, you can simply refer to Me rather than shView since you are referring to the sheet containing the code.
    Good luck.

  7. #7
    Registered User
    Join Date
    07-01-2010
    Location
    United States
    MS-Off Ver
    Excel 2011 (Mac)
    Posts
    77

    Re: Macros working fine on Windows (Excel 2010), but not on Mac (Excel 2011)

    Thank you very much! That did the trick.

    Just one other thing that I'm now noticing: using the delete buttons does remove entries just fine, but the sheet does not automatically update to reflect this (which it used to do). The user has to reselect the account name from the dropdown. I assume I need to add some way to refresh the Account View sheet in the Button Macros code in order to have it happen automatically, but I'm unsure as to the best way to do it.

  8. #8
    Registered User
    Join Date
    07-01-2010
    Location
    United States
    MS-Off Ver
    Excel 2011 (Mac)
    Posts
    77

    Re: Macros working fine on Windows (Excel 2010), but not on Mac (Excel 2011)

    For reference, here is the code (located in Button Macros after the Holdings Master sheet is searched and the entry in question is deleted):

    Please Login or Register  to view this content.
    As the comment suggests, this code used to update the Account View sheet (the macro for which monitors changes to cell A4, where the user name is selected). On the Mac, it doesn't seem to work. Any ideas on how to trigger a sheet refresh on the Account View sheet after lines have been deleted from the Holdings Master sheet?

  9. #9
    Registered User
    Join Date
    07-01-2010
    Location
    United States
    MS-Off Ver
    Excel 2011 (Mac)
    Posts
    77

    Re: Macros working fine on Windows (Excel 2010), but not on Mac (Excel 2011)

    Edit: oops, duplicate post.

  10. #10
    Forum Expert OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,655

    Re: Macros working fine on Windows (Excel 2010), but not on Mac (Excel 2011)

    Untested, but you could simply do something like this

    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    07-01-2010
    Location
    United States
    MS-Off Ver
    Excel 2011 (Mac)
    Posts
    77

    Re: Macros working fine on Windows (Excel 2010), but not on Mac (Excel 2011)

    Gave that a shot, didn't seem to work... If you have any ideas, would be great to hear. Thanks very much for all the help thus far.

  12. #12
    Forum Expert OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,655

    Re: Macros working fine on Windows (Excel 2010), but not on Mac (Excel 2011)

    To be honest, I am not sure what the issue is that you are seeing. As far as I can see, everything updates when you delete an item.

  13. #13
    Registered User
    Join Date
    07-01-2010
    Location
    United States
    MS-Off Ver
    Excel 2011 (Mac)
    Posts
    77

    Re: Macros working fine on Windows (Excel 2010), but not on Mac (Excel 2011)

    Hmm... Maybe a Mac only issue then. Anyone with a Mac who could test it?

    I'll test it on a PC shortly...

  14. #14
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Macros working fine on Windows (Excel 2010), but not on Mac (Excel 2011)

    I was looking at the OP file on my Mac.
    What delete buttons are you talking about?

    What do you want me to do to test this?
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  15. #15
    Registered User
    Join Date
    07-01-2010
    Location
    United States
    MS-Off Ver
    Excel 2011 (Mac)
    Posts
    77

    Re: Macros working fine on Windows (Excel 2010), but not on Mac (Excel 2011)

    If I use the grey delete buttons (to the far right of the entries) to remove entries from the lower portion of the Account View sheet, the entries do get removed. However, to see the change, I need to refresh the sheet by reselecting the account name from the dropdown list in the upper left hand corner of the sheet. If I remember correctly, the page refresh worked automatically on PC Excel, though it's not working right now on my Mac. I'll continue to experiment... Please let me know if you have any further thoughts. Thanks much.

  16. #16
    Forum Expert OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,655

    Re: Macros working fine on Windows (Excel 2010), but not on Mac (Excel 2011)

    I was testing it on a Mac as it happens and it worked for me.

  17. #17
    Registered User
    Join Date
    07-01-2010
    Location
    United States
    MS-Off Ver
    Excel 2011 (Mac)
    Posts
    77

    Re: Macros working fine on Windows (Excel 2010), but not on Mac (Excel 2011)

    Interesting... I have no idea why it doesn't work for me. Guess I'll play with it a bit more.

    Thanks!

  18. #18
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Macros working fine on Windows (Excel 2010), but not on Mac (Excel 2011)

    Quote Originally Posted by six6to8eight View Post
    If I use the grey delete buttons (to the far right of the entries) to remove entries from the lower portion of the Account View sheet, the entries do get removed. However, to see the change, I need to refresh the sheet by reselecting the account name from the dropdown list in the upper left hand corner of the sheet. If I remember correctly, the page refresh worked automatically on PC Excel, though it's not working right now on my Mac. I'll continue to experiment... Please let me know if you have any further thoughts. Thanks much.
    I can't find any buttons on any sheets. What cell do you want me to go to, on what sheet, and do what for testing?

  19. #19
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Macros working fine on Windows (Excel 2010), but not on Mac (Excel 2011)

    Hi Mike...I looked for it a while myself. Click on the dropdown in Account View Cell A4. Don't have Excel for the Mac...hope you can help the OP.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  20. #20
    Registered User
    Join Date
    07-01-2010
    Location
    United States
    MS-Off Ver
    Excel 2011 (Mac)
    Posts
    77

    Re: Macros working fine on Windows (Excel 2010), but not on Mac (Excel 2011)

    John -- thanks for pointing it out.

    Mike -- apologies, I haven't been all that clear. As John mentioned: by selecting an account from the dropdown list in cell A4 on Account View, the sheet is populated with holdings below. The delete buttons show up to the right of these entries.

    The buttons work to delete their respective entries just fine on both Mac and PC. However, on the PC, the sheet automatically refreshes after the delete command is carried out (see Button Macros module code with comment at the bottom showing where the page refresh occurs, by setting A4 equal to itself). On the Mac, the page does not refresh automatically, even with the same code. Hope this makes more sense.

    I'm actually working off of a newer version of the file now, but the site isn't letting me upload it right now for some reason... I've deleted the older file to avoid confusion, and will try to post the newer one as soon as the site stops acting up. Any solution you can find with the old file could also simply be incorporated into the new. Thanks very much to both of you.

+ 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