+ Reply to Thread
Results 1 to 14 of 14

Check list via VBA

  1. #1
    Registered User
    Join Date
    01-11-2019
    Location
    India
    MS-Off Ver
    MS 365
    Posts
    68

    Check list via VBA

    Hi,

    I have a check list in excel with more than 100+ rows. I have also added strike through once I click on the checkbox
    my office pc doesn't have the new version of excel with insert-check box feature

    so, I found out below vba code that can help... now the problem is this code works for single rectangle shape. and I have 102 rectangles...

    my rectangles start from Rectangle 11 to 96 and my strikethrough range is from J4 to J89
    and again from rectangle 97 to 102 and strike through range - J95 to J100


    is there a shorter way to tweak this code in such a way that it changes the shape number along with the range of strike through? for each rectangle I have to change the range in 3 different lines as shown below (highlighted in purple). I am attaching sample workbook for easier reference.

    I know that we have ActiveX check box option from developer tab... and I am currently using it... but it does not allow to increase the size of the small square and it won't allow to change background color either.... so I am trying this one out... Please can someone help!


    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by Kinjal Doshi; 05-16-2025 at 06:00 AM.

  2. #2
    Forum Contributor
    Join Date
    10-16-2023
    Location
    Poland
    MS-Off Ver
    Excel 2019 32bit WIN10
    Posts
    142

    Re: Check list via VBA

    You can use one procedure.
    Please Login or Register  to view this content.
    It should be assigned to each rectangle.

  3. #3
    Registered User
    Join Date
    01-11-2019
    Location
    India
    MS-Off Ver
    MS 365
    Posts
    68

    Re: Check list via VBA

    Hi Tajan,

    Thanks for the tweak... but as I have mentioned... I have 102 rectangles.

    Is there another code that can help assign this to each rectangles?
    my rectangle numbers are from Rectangle 11 to Rectangle 102

  4. #4
    Valued Forum Contributor
    Join Date
    05-02-2013
    Location
    Poland
    MS-Off Ver
    Excel 2013
    Posts
    356

    Re: Check list via VBA

    1. Code in Module1

    Please Login or Register  to view this content.
    2. Code in ThisWorkbook

    Please Login or Register  to view this content.
    3. Save file -> Close file -> reopen file
    Last edited by hungt; 05-16-2025 at 06:50 AM.

  5. #5
    Registered User
    Join Date
    01-11-2019
    Location
    India
    MS-Off Ver
    MS 365
    Posts
    68

    Re: Check list via VBA

    Hi Hungt,

    This is awesome! works perfectly
    Thank you so much!

    Regards,
    Kinjal

  6. #6
    Registered User
    Join Date
    01-11-2019
    Location
    India
    MS-Off Ver
    MS 365
    Posts
    68

    Re: Check list via VBA

    Hi Hungt,

    one more help! can you also share a code which can help to de-select all the checkboxes once all my tasks are completed?

  7. #7
    Forum Contributor
    Join Date
    10-16-2023
    Location
    Poland
    MS-Off Ver
    Excel 2019 32bit WIN10
    Posts
    142

    Re: Check list via VBA

    Quote Originally Posted by Kinjal Doshi View Post
    Is there another code that can help assign this to each rectangles?
    my rectangle numbers are from Rectangle 11 to Rectangle 102
    Use code:

    Please Login or Register  to view this content.
    Edit: The above macro reports an error because there is no "Rectangle 69". There is "Shape 57".
    Last edited by Tajan; 05-16-2025 at 07:25 AM.

  8. #8
    Registered User
    Join Date
    01-11-2019
    Location
    India
    MS-Off Ver
    MS 365
    Posts
    68

    Re: Check list via VBA

    Hi Tajan,

    Thanks!

    Can you or hungt share a code which can help to de-select all the checkboxes once all my tasks are completed?

  9. #9
    Forum Contributor
    Join Date
    10-16-2023
    Location
    Poland
    MS-Off Ver
    Excel 2019 32bit WIN10
    Posts
    142

    Re: Check list via VBA

    Try this:
    Please Login or Register  to view this content.

  10. #10
    Valued Forum Contributor
    Join Date
    05-02-2013
    Location
    Poland
    MS-Off Ver
    Excel 2013
    Posts
    356

    Re: Check list via VBA

    Here you go

    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    01-11-2019
    Location
    India
    MS-Off Ver
    MS 365
    Posts
    68

    Re: Check list via VBA

    Hi Hungt,

    This only unselects the checkbox... but doesn't remove my strikethrough and change back my color to black font
    can you also add a code for this?

  12. #12
    Forum Contributor
    Join Date
    10-16-2023
    Location
    Poland
    MS-Off Ver
    Excel 2019 32bit WIN10
    Posts
    142

    Re: Check list via VBA

    E.g.
    Please Login or Register  to view this content.

  13. #13
    Valued Forum Contributor
    Join Date
    05-02-2013
    Location
    Poland
    MS-Off Ver
    Excel 2013
    Posts
    356

    Re: Check list via VBA

    Here you go

    Please Login or Register  to view this content.

  14. #14
    Registered User
    Join Date
    01-11-2019
    Location
    India
    MS-Off Ver
    MS 365
    Posts
    68

    Re: Check list via VBA

    It worked.
    Thank you

    Thanks 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)

Similar Threads

  1. Replies: 14
    Last Post: 05-02-2024, 03:40 PM
  2. [SOLVED] Search Text from List (multiple columns) and check if List words appears in String
    By dluhut in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 08-31-2022, 08:25 AM
  3. Check if a list of barcodes would form cluster groups inside of another barcode list
    By hasan mougharbel in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-25-2022, 06:26 AM
  4. [SOLVED] [Google sheet] Check if values in list exists in another list and show them in range
    By jaryszek in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 3
    Last Post: 09-21-2021, 04:50 AM
  5. Replies: 4
    Last Post: 11-05-2014, 09:38 AM
  6. Replies: 0
    Last Post: 06-27-2014, 04:16 PM
  7. Replies: 1
    Last Post: 12-14-2012, 10:11 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