Option
Explicit
Private
Sub
CheckBox1_Change()
Dim
chk
As
Word.InlineShape
Set
chk = GetActiveXObject(
"CheckBox1"
, ThisDocument)
If
Not
chk
Is
Nothing
Then
If
chk.Range.Tables.Count > 0
Then
With
chk.Range.Cells(1)
MsgBox chk.OLEFormat.
Object
.Name &
" befindet sich in Zelle {"
& .RowIndex &
", "
& .ColumnIndex &
"}"
End
With
End
If
End
If
End
Sub
Private
Function
GetActiveXObject(Name
As
String
, Document
As
Word.Document)
As
Word.InlineShape
Dim
obj
As
Word.InlineShape
For
Each
obj
In
Document.InlineShapes
If
0 = StrComp(obj.OLEFormat.
Object
.Name, Name, vbTextCompare)
Then
Set
GetActiveXObject = obj
Exit
Function
End
If
Next
End
Function