Checking if something exists in a collection
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
What am I doing wrong here?
How do I check to see if an item exists in collection? This bombs
out at the red line.
Sub Test()
Dim acdTxtStylesColl As AcadTextStyles
Dim strTxtStyleName As String
strTxtStyleName = "ISO3098B"
Set acdTxtStylesColl = ThisDrawing.TextStyles
If acdTxtStylesColl.Item("strTxtStyleName")
Then
MsgBox "STYLE EXISTS"
End If
End Sub
--
NOTICE: This message contains privileged and confidential information
intended only for the use of the addressee named above. If you are
not
the intended recipient of this message you are hereby notified that
you
must not disseminate, copy or take any action in reliance on it. If
you
have received this message in error please notify Sinclair Knight Merz
Pty Ltd immediately. Any views expressed in this message are those
of
the individual sender, except where the sender has the authority to
issue and specifically states them to be the views of Sinclair Knight
Merz.
--
CAUTIONARY NOTES CONCERNING THE USE OF ELECTRONICALLY TRANSFERRED DATA
SINCLAIR KNIGHT MERZ
--
The documentation produced by using this electronic data is uncontrolled
and not subject to
update. The recipient is responsible for reviewing the status of the
transferred information and
should advise Sinclair Knight Merz immediately upon receipt of any
discrepancy. The design
and details are applicable to the intended project only and must not
be
reproduced wholly or
in part, or supplied to any third party without the written permission
of Sinclair Knight Merz
who retains copyright of all the transmitted material
--
The sender makes no warranty regarding the presence of electronic or
magnetic data errors
or computer viruses, or as to the accuracy or completeness of the data
transmitted.