+ Reply to Thread
Results 1 to 3 of 3

Combine Two Macros so they Work Together

  1. #1
    Forum Contributor
    Join Date
    06-21-2010
    Location
    -
    MS-Off Ver
    Excel 2010
    Posts
    1,211

    Combine Two Macros so they Work Together

    I have two buttons (Shapes) which when clicked each hide a different set of columns (see attached), the problem at the moment is that the user has to click a second time on each button to show 'all' columns before clicking the second button to hide the second set of columns:

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Is there some way to adapt the code so that if clicking on the 'Reds' button, it hides the blue columns (as it currently does), but if the user clicks on the 'Blues' button, whilst the red columns are already hidden, it effectively shows all columns and then hides just the red columns and vice versa, so the user doesn't have to unhide all the columns first for each button to display the correct set of columns?

    Many thanks

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,947

    Re: Combine Two Macros so they Work Together

    Change to, maybe:

    Please Login or Register  to view this content.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Forum Contributor
    Join Date
    06-21-2010
    Location
    -
    MS-Off Ver
    Excel 2010
    Posts
    1,211

    Re: Combine Two Macros so they Work Together

    Perfect, many thanks

+ 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. Combine 3 macros into one
    By zain_shaikh in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-02-2015, 08:24 AM
  2. [SOLVED] Macro Doesn't Work Through Button, Does Work Through Developer ->Macros Option
    By freybe06 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 06-27-2013, 11:55 AM
  3. Combine 2 Macros into 1
    By anwood1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-24-2013, 11:37 AM
  4. Macros stop to work when work sheet is protected. Run time error 1004
    By sellim in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-18-2012, 01:14 AM
  5. Copy rows from work sheets to combine to one work sheet based on cell value
    By joemcmillen in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-11-2008, 05:04 PM

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