mit folgendem Code möchte ich prüfen, ob die Caption einer Checkbox mit dem Text in einer Zelle eines Tabellenblattes übereinstimmt:
For i1 = 1 To 6
boxnam = "cbox" & i1
If OLEObjects(boxnam).Object.Value = False Then
boxcap = OLEObjects(boxnam).Object.Caption
For i2 = 1 To 5
thema = Range("b" & i2).Value
MsgBox boxcap & " " & thema
If thema = boxcap Then MsgBox "gefunden"
Next
End If
Next
boxnam, boxcap und thema sind string-variabeln.
Warum funktioniert das nicht?
Gruß Emil