+ Reply to Thread
Results 1 to 12 of 12

Combining eight Macros into one

  1. #1
    Registered User
    Join Date
    02-03-2024
    Location
    Katowice, Poland
    MS-Off Ver
    MS Office 2019
    Posts
    8

    Combining eight Macros into one

    Hello everyone
    I have eight Checkboxes and each of them has a Macro assigned to it. The way I did it takes a moment to execute the Macro.
    I am asking you if it is possible to combine these Macros into one and assign this Macro to all eight CheckBoxes

    Please Login or Register  to view this content.
    Thank you in advance for your help.

  2. #2
    Forum Expert
    Join Date
    11-28-2015
    Location
    indo
    MS-Off Ver
    2016 64 bitt
    Posts
    1,512

    Re: Combining eight Macros into one

    in class module name of class is ClsEvents
    Please Login or Register  to view this content.
    in userform initialize
    Please Login or Register  to view this content.
    "Presh Star Who has help you *For Add Reputation!! And mark case as Solve"

  3. #3
    Forum Expert
    Join Date
    11-28-2015
    Location
    indo
    MS-Off Ver
    2016 64 bitt
    Posts
    1,512

    Re: Combining eight Macros into one

    or like this
    Please Login or Register  to view this content.

  4. #4
    Forum Expert
    Join Date
    11-28-2015
    Location
    indo
    MS-Off Ver
    2016 64 bitt
    Posts
    1,512

    Re: Combining eight Macros into one

    deleted by me
    Last edited by daboho; 05-12-2024 at 03:56 PM.

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,962

    Re: Combining eight Macros into one

    Without the workbook and checkboxes, this hasn't been tested in context, but I would have thought you could just combine the code like this:

    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  6. #6
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,565

    Re: Combining eight Macros into one

    What kind of CheckBoxes? FormControl or ActiveX?
    On a Sheet or on a UserForm?
    Experience trumps academics every day of the week and twice on Sunday.

  7. #7
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,565

    Re: Combining eight Macros into one

    If your Checkboxes are Form Control Checkboxes, are named like in your code from Post #1 and are on a Sheet, would this not be simpler?
    One little Macro for all CheckBoxes.
    Please Login or Register  to view this content.

  8. #8
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,565

    Re: Combining eight Macros into one

    I guess nothing worked as we haven't heard anything like "Thank you" or "No it did not work the way I planned it."

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,962

    Re: Combining eight Macros into one

    No interest?

    Join Date 02-04-2024
    Last Activity 05-12-2024 08:26 PM

    Presumably saw the first response from daboho.

  10. #10
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,565

    Re: Combining eight Macros into one

    Hi Trevor.
    What is this world coming to? If it was not for you and me, and maybe a few others, it would be a heck of a mess!!!!!!!
    I guess we'll live with it.
    Have a good one.

  11. #11
    Registered User
    Join Date
    02-03-2024
    Location
    Katowice, Poland
    MS-Off Ver
    MS Office 2019
    Posts
    8

    Re: Combining eight Macros into one

    I'm sorry and I apologize again but I didn't have access to the Internet!!!

  12. #12
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,962

    Re: Combining eight Macros into one

    No worries.

    You're welcome. Thanks for the rep.



    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon (Next to Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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. [SOLVED] Combining Two macros into one.
    By Tubtech in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-24-2022, 03:44 PM
  2. Combining macros
    By Chris2460 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-08-2016, 06:09 AM
  3. Need help combining 3 different macros
    By sai0449 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 12-10-2015, 01:01 PM
  4. help in combining two macros
    By ssuman1010 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-09-2015, 11:22 PM
  5. [SOLVED] Help combining macros
    By liquidmettle in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-20-2015, 09:33 AM
  6. [SOLVED] Combining 2 macros
    By bnwash in forum Excel General
    Replies: 5
    Last Post: 01-02-2015, 10:13 PM
  7. Combining Macros
    By rocketboy13 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-01-2011, 02:45 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