Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Apr 2002
    Location
    Sydney, New South Wales, Australia
    Posts
    86
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Finding Properties of Check boxes (excel 2003)

    Can I find out through VBA the Range of the Cell (containing the "True" or "False") that is linked to a check box without knowing the name of the check box.
    The check box would be the current/active check box that is clicked and the code to find the cell range and value would be in the macro applied to that check box.
    I have a number of check boxes and I want to have the same macro applied to them all (I'm currently writing a small macro for each check box) which states the Locations and Value of the linked cell and then runs the main macro I want performed.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Finding Properties of Check boxes (excel 2003)

    Assuming that you have created check boxes from the Forms toolbar, the address of the linked cell is

    ActiveSheet.Shapes(Application.Caller).ControlForm at.LinkedCell

    so if you want a Range object representing the cell:

    ActiveSheet.Range(ActiveSheet.Shapes(Application.C aller).ControlFormat.LinkedCell)

  3. #3
    Star Lounger
    Join Date
    Apr 2002
    Location
    Sydney, New South Wales, Australia
    Posts
    86
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Finding Properties of Check boxes (excel 2003)

    Thank you Hans

    that is very handy

    King Regards Paul

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •