+ Reply to Thread
Results 1 to 2 of 2

run multiple activeX control checkboxes with one sub

  1. #1
    Registered User
    Join Date
    12-04-2019
    Location
    usa
    MS-Off Ver
    2017
    Posts
    1

    run multiple activeX control checkboxes with one sub

    I have 10 activeX control checkboxes in column A (A1 to A10). I want to capture the username in column B (B1 to B10) when each checkbox from column A is checked. I have created 10 different subs to make this work. However, i would like to know if there's a way to combine them into one sub. Thanks in advance.




    Please Login or Register  to view this content.
    etc....
    Last edited by howdog; 01-06-2020 at 02:21 AM.

  2. #2
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: run multiple activeX control checkboxes with one sub

    Yes, firstly don’t use activex controls on worksheets, it’s asking for trouble.

    If you use a forms control checkbox on the worksheet you can assign them all the same macro. When the macro runs, you can use Application.Caller to find the name of the checkbox that triggered the macro. From there you can find its location on the sheet and use that to work out which cell to change.

    Also, I fear you may not have read the rules when you signed up:

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)

+ 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. Hide multiple ActiveX checkboxes with name as variable when a cell is returning blank
    By cristihendrix in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-20-2017, 08:59 AM
  2. multiple checkboxes to control autofilter
    By ruub7 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-16-2017, 02:52 PM
  3. multiple activeX control combo boxes trigger each other
    By aprildu in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 11-04-2016, 01:01 AM
  4. [SOLVED] One Sub for Multiple Command Buttons (ActiveX Control)
    By Raymundus in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-19-2016, 11:30 AM
  5. VBA controling multiple ActiveX control boxes
    By celue in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-24-2013, 04:51 PM
  6. [SOLVED] ActiveX control checkbox to (un-)check all checkboxes
    By Stefan1983 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-31-2012, 07:39 AM
  7. ActiveX Control Checkboxes and Table Order
    By rubix in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-09-2010, 08:39 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