I have the following code below, I am trying to determine the number of occurences of a symbol "Symbol 01". I can get the basic function to work i just dont know how to use a value "w" and increment it, any help is much appreciated. Thanks.
Public Sub SketchSymbolTest()
Dim oDoc As DrawingDocument
Dim oSheet As Sheet
Dim oSS As SketchedSymbol
Dim w As Long
Set oDoc = ThisApplication.ActiveDocument
Set oSheet = oDoc.ActiveSheet
For Each oSS In oSheet.SketchedSymbols
If oSS.Definition.Name = "Symbol 01" Then
' ### This is where i dont know what to do
End If
Next
MsgBox w, , " Occurences In this Document"
End Sub