+ Reply to Thread
Results 1 to 7 of 7

Hide Columns Macro - Working on Windows not working on Mac OSX

  1. #1
    Registered User
    Join Date
    01-30-2014
    Location
    Timisoara, Romania
    MS-Off Ver
    MS 365 Subscription for Mac
    Posts
    7

    Angry Hide Columns Macro - Working on Windows not working on Mac OSX

    Hi,

    This is very frustrating - I've been looking everywhere for an answer with no luck.
    The below macro, assigned to a checkbox, works with no issues on Windows, but once moved to OSX it fails to compile successfully.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Hide Columns Macro - Working on Windows not working on Mac OSX

    Hi bcadar,

    I looks like you are using 'Active X' CheckBoxes from the code. According to the following link, 'Active X' CheckBoxes do not work on the MAC. http://www.excelforum.com/excel-prog...ng-on-mac.html

    It looks like you may have to change your 'Active X' CheckBoxes to Forms 'CheckBoxes'.

    ---------------
    In Windows, Active X Controls do not play nicely with others, especially if you are hiding rows and/or columns. You are probably very lucky you did not have corruption in your Windows file caused by the 'Active X' controls.

    Lewis

  3. #3
    Registered User
    Join Date
    01-30-2014
    Location
    Timisoara, Romania
    MS-Off Ver
    MS 365 Subscription for Mac
    Posts
    7

    Re: Hide Columns Macro - Working on Windows not working on Mac OSX

    Hi LJMetzger,

    Thanks for the quick reply!
    I moved the code to a form checkbox and now it fails in windows - no errors - but once it hides the columns it no longer functions.
    Checking and unchecking the box with no results.

    Any ideas :S??

  4. #4
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Hide Columns Macro - Working on Windows not working on Mac OSX

    See the attached sample file for implementation of the following:

    The easiest way in Windows is to:
    a. Deleted
    b. Deleted
    c. Create an ordinary Code Module:
    ALT F11 (for VBA) > CTRL R > Right Click ThisWorkbook > Insert > Module
    d. Move your Sub to the new code Module and make it Public in the new code module and even change the name.

    In ordinary code module Module1:
    Please Login or Register  to view this content.
    e. Assign the Macro to the CheckBox
    Right Click on the CheckBox > Assign Macro > Select CheckBoxEventHandler

    It is a best practice to declare all variables. If you misspell a variable in your code, VBA will silently assume it is a Variant variable and go on executing with no clue to you that you have a bug. Go to the VBA development window, click Tools, Options, and check "Require Variable Declaration." This will insert the following line at the top of all new modules:
    Please Login or Register  to view this content.
    This option requires all variables to be declared and will give a compiler error for undeclared variables.

    Lewis
    Last edited by LJMetzger; 01-05-2016 at 05:54 PM. Reason: Deleted a. and b. - Do not apply here

  5. #5
    Registered User
    Join Date
    01-30-2014
    Location
    Timisoara, Romania
    MS-Off Ver
    MS 365 Subscription for Mac
    Posts
    7

    Re: Hide Columns Macro - Working on Windows not working on Mac OSX

    Works like a charm, thanks!

    The only problem I have now is Excel 2016 on Mac won't allow interaction with checkboxes/radiobuttons, etc.
    When I open the spreadsheet on the Mac the checkbox won't check/uncheck - ran the macros via macro window and that's not the issue.

    Maybe I'm not selecting something, maybe it's an extra step I need to be doing...I don't know, but it sure isn't intuitive.

  6. #6
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Hide Columns Macro - Working on Windows not working on Mac OSX

    It may not be a problem with the code. According to the last post in the following thread (posted about one week ago), many forms controls do not work on the MAC, and need a future update from Microsoft: http://answers.microsoft.com/en-us/m...60?db=5&auth=1

  7. #7
    Registered User
    Join Date
    01-30-2014
    Location
    Timisoara, Romania
    MS-Off Ver
    MS 365 Subscription for Mac
    Posts
    7

    Re: Hide Columns Macro - Working on Windows not working on Mac OSX

    @LJMetzger, thank you so much for your support!

    Sorry for not getting back sooner - wanted to post some sort of resolution.
    I currently have a ticket out with Microsoft. They did a remote session with no success and the case is currently being escalated.

    I'll post back as soon as it's resolved.

    B

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. VBA Mac - Downloading image not working (But working in Windows)
    By sthiru in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 8
    Last Post: 10-20-2014, 10:25 AM
  2. VBA Mac - Downloading image not working (But working in Windows)
    By sthiru in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-18-2014, 08:45 AM
  3. [SOLVED] Hide Columns Macro not working - Help?
    By overbomb in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-30-2013, 11:53 AM
  4. [SOLVED] Macro button to hide various columns, not working as desired.
    By steve@stanley in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 02-18-2013, 06:35 AM
  5. Macro's and VBA from a windows excel file not working on mac
    By samsonicx in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-21-2012, 07:33 AM
  6. [SOLVED] Macro not working in Windows 7
    By ms2000 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-04-2012, 12:06 PM
  7. ocde working in one windows login but stopped working in another.
    By rama1209 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-02-2011, 08:38 AM

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