Hallo,
versuche gerad den Elementetyp von den Elementen innerhalb eines Bilds über VBA auszulesen. Leider bekomme ich gleich welches Element (Button, verlinktes Symbol, Universalregler, etc.) ich übergebe immer den die Typnummer 0 zurück. Woran könnte das liegen? Der Code macht so natürlich noch kein Sinn, aber der Elemente-Typ sollte trotzdem richtig sein.
VBA Code:
Sub getSymbol()
Dim zELE As Element
Dim zPIC As DynPicture
Const strPicture As String = "myPic"
Set zPIC = thisProject.DynPictures.Item(strPicture)
If Not zPIC Is Nothing Then
Set zELE = zPIC.Elements.Item("myElement")
If Not zELE Is Nothing Then
MsgBox (CStr(zELE.Type) + Chr(10) + Chr(13) + zELE.Name)
End If
End If
Set zPIC = Nothing
Set zELE = Nothing
End Sub
VG und ein schönes Wochenende
This is a migrated post! Originally posted on 16.03.2012 by user sniggi. Please be aware that information can be outdated.