R
rhatcher
Im trying to use a wildcard calling the names of subshapes (grouped
shapes). The shape names are in the format of "Property Cell.#" or
"Property Cell.TEXT" Like "Property Cell.3" and "Property
Cell.UnitNumber" etc. I want it to iterate through all shapes with
"Property Cell" in the name. However, I cannot get the wild cards that
are in the VBA help to work.
Im trying "*" and "?" although from what Im reading, "*" should work.
My code looks like this:
For Each subShpObj In shpsObj
If subShpObj.Name = "Property Cell.*" Then
UserForm1.ListBox1.AddItem subShpObj.Name
End If
Next
Which finds nothing
If I modify the code to:
If subShpObj.Name = "Property Cell.3" Then
It does find the shape "Property Cell.3" so I know that otherwise the
code works.
What am I doing wrong, are wildcards usable in this case?
thanks
shapes). The shape names are in the format of "Property Cell.#" or
"Property Cell.TEXT" Like "Property Cell.3" and "Property
Cell.UnitNumber" etc. I want it to iterate through all shapes with
"Property Cell" in the name. However, I cannot get the wild cards that
are in the VBA help to work.
Im trying "*" and "?" although from what Im reading, "*" should work.
My code looks like this:
For Each subShpObj In shpsObj
If subShpObj.Name = "Property Cell.*" Then
UserForm1.ListBox1.AddItem subShpObj.Name
End If
Next
Which finds nothing
If I modify the code to:
If subShpObj.Name = "Property Cell.3" Then
It does find the shape "Property Cell.3" so I know that otherwise the
code works.
What am I doing wrong, are wildcards usable in this case?
thanks