+ Reply to Thread
Results 1 to 3 of 3

Use checkbox on sheet ('true' or 'false') to decide if run macro

  1. #1
    Valued Forum Contributor
    Join Date
    11-20-2003
    MS-Off Ver
    2010, 2016
    Posts
    1,137

    Use checkbox on sheet ('true' or 'false') to decide if run macro

    I want to use the value of a checkbox on a sheet to decide which part of macro to run.

    if Checkbox = true then
    execute this section if box is checked
    else
    execute this section if box is unchecked
    end if

    For the checkbox on sheet, would I need to create an ActiveX Control or a Form Control? Further, once the checkbox is created, how do I determine the name of the object to use in my macro? Thanks in advance for any comments..

  2. #2
    Forum Contributor
    Join Date
    08-17-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    132

    Re: Use checkbox on sheet ('true' or 'false') to decide if run macro

    Hi maacmaac

    My understanding is you can use either of them ("ActiveX for Form Control).

    In case of form Control - Once you have drawn the control then right click on it and click Format Control then go to Control tab and click on Linked cell and type any cell reference of your choice in the given box. The assigned cell reference will now show True in case of check box is Clicked and False otherwise. You then can use result of that cell in you macro.

    In case of ActiveX Control - Go to properties by Right click on control Then type a cell address in Linked cell and this cell will show the result TRUE/False which you can use inside you code.

    Hope this helps.

    Regards,
    BS

  3. #3
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Use checkbox on sheet ('true' or 'false') to decide if run macro

    Here:

    Please Login or Register  to view this content.

+ 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] Removing the True/False within cell when linked to Checkbox
    By MadelynL in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-20-2013, 03:04 PM
  2. Checkbox: If true all others are false?
    By Rick_Stanich in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-03-2007, 11:57 AM
  3. Condition code True False on Checkbox
    By RobertCo in forum Excel General
    Replies: 2
    Last Post: 12-16-2006, 07:47 AM
  4. checkbox true/false label
    By jashby2@gmail.com in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-04-2005, 12:05 PM
  5. Checkbox toggle true/false
    By Donkin in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-02-2005, 04:37 AM

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