Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    Sep 2002
    Location
    Madrid, Madrid, Spain
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Reference check box values (2000 /2002)

    Have someone faced the chalenge to obtain one check box value that resides on a worksheet, from one different exel workbook? I do know that you can obtain the value of one particular cell by using the formula : "%full pathname%!Sheet!cellref", but cannot address ano checkbox.
    Any ideas?
    Thanks.

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

    Re: Reference check box values (2000 /2002)

    You can link a check box to a cell. and refer to the value of that cell.

    If you created the check box using the Forms toolbar, right click the check box and select Format Control... In the Control tab, set the Cell Link to a cell address.

    If you created the check box using the Control Toolbox, make sure that Design Mode is on, then right click the check box and select Properties. Set the LinkedCell property to a cell address.

  3. #3
    New Lounger
    Join Date
    Sep 2002
    Location
    Madrid, Madrid, Spain
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Reference check box values (2000 /2002)

    Thanks Hans,
    unfortunately, that does not solve the problem, since the form is already created and what I need to do is to read the set values from a different workbook.

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

    Re: Reference check box values (2000 /2002)

    If you created the check box using the Control Toolbox, you can see its name in the Properties window. You can refer to its value in code like this:

    Workbooks("Book1.xls").Worksheets("Sheet1").CheckB ox1.Value

    You could use this (with the appropriate names substituted, of course) in a custom function. The workbook has to be open for this to work.

  5. #5
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    austin, Texas, USA
    Posts
    1,029
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Reference check box values (2000 /2002)

    I don't know if you're still working on this problem, but if you are trying to reference a checkbox, dropdown, etc. form element that is directly on a worksheet, you need to reference the object as Shape

    For example, to reference a drop down on a worksheet (NOT a user form):

    ActiveSheet.Shapes("Drop Down 30").Select

    In order to determine what the shape type and number is, make the drawing toolbar visible and click on the form element with the drawing tool arrow and click on the Name Box drop down. Once you get a shape selected you can alter properties, such as whether a check box is ticked or not or the value in a dropdown, etc.

    If you add or delete any form elements on the worksheet the numbers for all the shape elements are reset and you may have to control for that in the code.

Posting Permissions

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