+ Reply to Thread
Results 1 to 5 of 5

Finding the identification number of a check box

  1. #1
    Registered User
    Join Date
    01-02-2013
    Location
    Foster City, CA
    MS-Off Ver
    Excel 2010
    Posts
    37

    Finding the identification number of a check box

    I have an Excel sheet with several check boxes. I need to access one via a macro to uncheck it. I plan to use the following command, where n = the checkbox ID number

    ActiveSheet.CheckBoxes(n).Value = False

    My problem is that I don't know how to find the check box ID number. ANy help will be greatly appreciated.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Finding the identification number of a check box

    If you select it on the sheet, the name will appear in the Names box, left of the formula bar.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    01-02-2013
    Location
    Foster City, CA
    MS-Off Ver
    Excel 2010
    Posts
    37

    Re: Finding the identification number of a check box

    When I first added the check box it had name "Check Box" with a number added next. I changed this to the Text "Yes" for selection purposes so now I don;t know the number. I've tried both of the following commands and they both result in an error. I believe the macro editor is looking for a number.

    ActiveSheet.CheckBoxes("Yes").Value = False
    ActiveSheet.CheckBoxes(Yes).Value = False

    So since the number no longer shows, is there a way to identify the box?

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Finding the identification number of a check box

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    01-02-2013
    Location
    Foster City, CA
    MS-Off Ver
    Excel 2010
    Posts
    37

    Re: Finding the identification number of a check box

    That didn't work.

    I went ahead and deleted the check box, added an ActiveX check box and used the following command to clear it.

    ActiveSheet.CheckBox60.Value = False

    Thanks for your interest. I'll provide a sample spreadsheet next time.

+ 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