Option
Explicit
Sub
test_formular()
Dim
names()
As
Variant
Dim
shp
As
Excel.Shape
Dim
i
As
Long
names = Worksheets(
"Lists"
).Range(
"I"
)
With
Worksheets(
"Checklist Structure"
)
For
Each
shp
In
.Shapes
If
shp.Type = msoFormControl
Then
If
shp.FormControlType = xlCheckBox
Then
If
i <= UBound(names)
Then
Debug.Print Format$(i + 1,
"00"
) &
": "
& shp.OLEFormat.
Object
.Caption &
" => "
& names(i)
shp.OLEFormat.
Object
.Caption = names(i)
i = i + 1
Else
Exit
For
End
If
End
If
End
If
Next
If
i > 0
Then
Call
MsgBox(
"Fertig"
, vbInformation)
Else
Call
MsgBox(
"keine Treffer"
, vbInformation)
End
If
End
With
End
Sub