Simpying Repetitive Macro Codes

  • Hi all,


    Please help to simply the macro codes below:




    The code basically works well, however it increase the size of the file. The code goes on till 50 checkboxes in each row starting at Row 6.
    Hope you can help me with this to tidy up and speed up the processes.


    Thank you in advance.

  • Re: Simpying Repetitive Macro Codes


    Hello,


    Do you mean you have 50 times this code repeated for each of your checkboxes ...?

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Thumbs Up" icon, below, in the bottom right corner:)

  • Re: Simpying Repetitive Macro Codes


    Oh my. That seems inefficient.



    Only the top part is needed for each checkbox if the rest of the behaviour is generic

  • Re: Simpying Repetitive Macro Codes


    Hello,


    If you feel like building a 'one module only' solution for n checkboxes ... you will need to design a Class Module ...

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Thumbs Up" icon, below, in the bottom right corner:)

  • Re: Simpying Repetitive Macro Codes


    I would not use CheckBoxes. Take a look at these workarounds

  • Re: Simpying Repetitive Macro Codes


    @ Roy :smile:


    Marlett and Wingdings are your Best friends ...!!!


    Much easier than diving into a Class Module ...!!! :wink:


    Cheers

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Thumbs Up" icon, below, in the bottom right corner:)

  • Re: Simpying Repetitive Macro Codes


    If the row range changes for each one but the processing on that range stays the same then you should set the range accordingly from the checkbox click routine, then pass this along with the checkbox to the other generic functional routine.

  • Re: Simpying Repetitive Macro Codes


    If you insist on using Checkboxes, it would be much easier to use Form controls so that you can assign the same macro to all of them.

    Rory
    Theory is when you know something, but it doesn’t work. Practice is when something works, but you don’t know why. Programmers combine theory and practice: nothing works and they don’t know why

  • Re: Simpying Repetitive Macro Codes


    I would be very glad if you help me redo the codes please... I have very limited knowledge on vba and your assistance is highly appreciated.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!