Question: i want to assign a text to my check box which i have added via VBA
here is a code

```
ActiveSheet.OLEObjects.Add "Forms.CheckBox.1", Left:=Range("J6").Left, Top:=Range("J6").Top, Width:=Range("J6").Width, Height:=Range("J6").Height

```

how to change the text of the checkbox using VBA

Answer: 
The `.Add` method of OLEObjects returns the object that was added, so just grab a reference to it if you need to work with its properties. In this case, you're looking for the Caption property:

```
Dim check_box As OLEObject

Set check_box = ActiveSheet.OLEObjects.Add("Forms.CheckBox.1", _
                Left:=Range("J6").Left, Top:=Range("J6").Top, _
                Width:=Range("J6").Width, Height:=Range("J6").Height)
check_box.Object.Caption = "Yes"

```
If its the first CheckBox added to the worksheet then:

```
ActiveSheet.OLEObjects("CheckBox1").Object.Caption = "Hello World!"

```

Otherwise you can change the name:

```
ActiveSheet.OLEObjects("CheckBox1").Name = "cMain"

```

And then reference it like this:

```
ActiveSheet.OLEObjects("cMain").Object.Caption = "Hello there!"

```