+ Reply to Thread
Results 1 to 3 of 3

Assigning more than one macro to a check box

  1. #1
    Registered User
    Join Date
    01-24-2008
    Posts
    2

    Assigning more than one macro to a check box

    Hi everybody,

    I'm fairly new to Excel (though I'm Excel 2000), so apologies if this question is ridiculous or doesn't make sense.

    I want to use a check box so that when I check it it runs one macro, then when I uncheck it it runs another macro. As far as I know I can only assign one macro to it, which means that it runs the same macro when the box is checked or unchecked.

    I understand that I can use Cell Link to give a TRUE or FALSE output, so would it be possible to do something like, IF $A$1 = TRUE run MACRO1, IF $A$1 = FALSE run MACRO2?

    There surely must be a way of doing this, or something similar anyway. Thanks in advance for any assistance you can give.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,474

    Run Macro Whith Check Boxes

    There are a couple of ways to do this
    Using a checkbox from the controls tool bar:
    place the checkbox on the sheet and double click on it, this takes you to the code window, paste this code there
    the msgbox code is where your macro would be
    Please Login or Register  to view this content.
    Using the forms tool bar place the check box on the sheet, right click on the checkbox and select format control
    select the cell link C9 for this example
    Click anywhere outside the checkbox then
    right click on the check box again and
    select assign macro, then click new
    paste this code there
    Please Login or Register  to view this content.
    The text in blue goes between the check box name and end sub
    Last edited by davesexcel; 01-24-2008 at 08:12 AM.

  3. #3
    Registered User
    Join Date
    01-24-2008
    Posts
    2
    This worked perfectly, many thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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