+ Reply to Thread
Results 1 to 10 of 10

checkBox activeX , how can I add it for 500 rows in specific column with same code? Macro

  1. #1
    Registered User
    Join Date
    07-30-2014
    Location
    london
    MS-Off Ver
    2013
    Posts
    3

    checkBox activeX , how can I add it for 500 rows in specific column with same code? Macro

    Hello everyone

    how are you

    I need a quick help

    I have a sheet in excel 2013

    in column "Y" I want to add a checkBoxs activeX from cell 6 until cell 500

    is there any code to help me with it , I don't want to repeat it 500 times )":

    this is my code for a single checkBox I hope anyone help me to make it work in general

    Please Login or Register  to view this content.

  2. #2
    Registered User
    Join Date
    07-17-2014
    Location
    Turkey
    MS-Off Ver
    2003
    Posts
    85

    Re: checkBox activeX , how can I add it for 500 rows in specific column with same code? Ma

    Add CheckBoxes
    Hope it will work !

    for Y column please change to code like this;

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by cemregunay; 07-30-2014 at 10:30 PM.

  3. #3
    Forum Contributor pareshj's Avatar
    Join Date
    05-20-2014
    Location
    MUMBAI
    MS-Off Ver
    2007 & 2010
    Posts
    447

    Re: checkBox activeX , how can I add it for 500 rows in specific column with same code? Ma

    Hi,

    This is an ActiveX control and for each click event you have to write it. What you can do is, on each CheckBox Click event call function that checks whether that check box is checked. Hence you will have one common subroutine for 500 clicks.

    Please Login or Register  to view this content.

    Note: You need to change CheckBox2.Value to control that is passed in method.

    Regards,
    Paresh J
    Click on "* Add Reputation" as a way to say thanks

  4. #4
    Registered User
    Join Date
    07-17-2014
    Location
    Turkey
    MS-Off Ver
    2003
    Posts
    85

    Re: checkBox activeX , how can I add it for 500 rows in specific column with same code? Ma

    8501.jpg

    Please Login or Register  to view this content.
    According to code, you have to determine a checkbox (Checkbox1) and if this checkbox.value=True then code will be active.


  5. #5
    Registered User
    Join Date
    07-30-2014
    Location
    london
    MS-Off Ver
    2013
    Posts
    3

    Re: checkBox activeX , how can I add it for 500 rows in specific column with same code? Ma

    I try to apply cemregunay code without userform ("":

    its work when I check the first checkbox I will get 500 chechboxes

    But I cant my condition which was when I check the checkbox the row back color will change to red

    I tried this code but it wasnot work ):


    Please Login or Register  to view this content.

  6. #6
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: checkBox activeX , how can I add it for 500 rows in specific column with same code? Ma

    Please Login or Register  to view this content.
    This code adds it
    linked cell behind it if you want to run code seperate from it
    but 500....so many...
    Last edited by humdingaling; 07-30-2014 at 11:22 PM.
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  7. #7
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: checkBox activeX , how can I add it for 500 rows in specific column with same code? Ma

    Quote Originally Posted by cemregunay View Post
    Add CheckBoxes
    Hope it will work !

    for Y column please change to code like this;

    Please Login or Register  to view this content.
    your sheet creates forms instead of activex though it runs much quicker than my posted code

  8. #8
    Registered User
    Join Date
    07-30-2014
    Location
    london
    MS-Off Ver
    2013
    Posts
    3

    Re: checkBox activeX , how can I add it for 500 rows in specific column with same code? Ma

    If I create it manually , because I want it without any text just checkBox

    can I use ( For Each checkBox in range ) ?? is there any code in this way ??

  9. #9
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: checkBox activeX , how can I add it for 500 rows in specific column with same code? Ma

    Slight amendment to my code

    column width set to 2 and linked cell working as intended
    my method makes caption = "" in checkbox as well

    also added worksheet selection change code to offset colorindex against linked cell

    click on selection of checkbox and slight anywhere on spreadsheet to trigger event
    Attached Files Attached Files

  10. #10
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: checkBox activeX , how can I add it for 500 rows in specific column with same code? Ma

    Using cemregunay method of "FORM" checkbox
    file is smaller
    Attached Files Attached Files

+ 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] Easy Macro needed to change some, not all, activeX checkbox to False or True
    By caliskier in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-07-2014, 12:51 PM
  2. [SOLVED] Macro code to show only the rows with specific cell text in a particular column
    By Itachi1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-04-2013, 01:33 PM
  3. [SOLVED] Macro code to Copy specific rows into specific columns
    By macrofan2012 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-11-2012, 11:24 AM
  4. Replies: 2
    Last Post: 09-20-2012, 11:54 AM
  5. format an entire column to contain checkbox activex control
    By blunoob in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 12-19-2005, 10:15 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