Read Value of checkbox embedded in excel worksheet RRS feed

  • Question

  • Hi,

    I have embedded a submit button and a checkbox into my excel sheet1. A click on the submit button invokes a script that is supposed to retrieve the state of my checkbox.

    I have embedded the checkbox via Developer->Insert->Form Controls (Not ActiveX controls).

    Sub Submit_Click()
    //this code works
    MsgBox ActiveSheet.Shapes("Check Box 3").Name         
    //this code does not work
    MsgBox ActiveSheet.Shapes("Check Box 3").Value           
    End Sub
    I have added a watch and breakpoint in my debugger. However I could not find a property that indicates where the checkbox is checked or not.

    Could anyone please let me know how to get to the value of my checkbox.

    Thank you!



    • Edited by towitt Thursday, May 2, 2013 11:27 PM
    • Moved by Youen Zen Friday, May 3, 2013 5:07 AM From Visual Basic
    Thursday, May 2, 2013 7:23 AM

All replies