0

I have two activeX checkboxes (checkbox7 and checkbox10) and I would like the caption that is shown next to the tickbox to change with the value of Sheet1 cell J13. J13 can change value by an IF statement

I've tried a couple of things. Tried using a code I found online but it was to create multiple checkboxes from scratch and then change the caption. I was trying to isolate the part where they change the caption and duplicating it, but that didn't do anything for me.

This is what I have now:

>     Sheets("Customer View").OLEObjects("CheckBox7").Object.Caption = Sheets("Customer View").Range("J13").Value
    Sheets("Customer View").OLEObjects("CheckBox10").Object.Caption = Sheets("Customer View").Range("J13").Value

Thanks

2 Answers 2

0

You are missing some double quotes in the Range() function:

Sub qwerty()
   With Sheets("Customer View")
      .OLEObjects("CheckBox7").Object.Caption = .Range("J13").Value
   End With
End Sub
1
  • whoops, I changed it, but it's still not working. I'm no getting any errors, it's just not doing anything.
    – Klister
    Dec 1, 2015 at 13:53
0

I eventually just went with the most simple solution: Leave the caption of the checkbox empty, and position the checkbox so that it lines up with an empty cell. Then I just use that cell to show the text I want.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .