Quantcast
Channel: PTC Community : All Content - Arbortext
Viewing all articles
Browse latest Browse all 1645

Logical macro syntax

$
0
0

I have this code, that work well :

SubMacro checkColors Protected
Define i As Integer
Define ColorName As String
Define Pattern As String

For i = 1 to activeDoc.colorCount
ColorName = activeDoc.colors[i].name
Pattern = Mid(ColorName, Find(ColorName, "(", 1)  + 1, 3)

If  (Pattern <> "co=") Then
  Select None
  Select If Color Is Equal To ColorName

If (activeDoc.selectedElements = 0) Then
 
  Else
  Return ColorName
  End If
End If
End For

Return "COLORS_OK"
End SubMacro

but if I replace the red colored code by this :

If (activeDoc.selectedElements <> 0) Then
Return ColorName
End If

It no works more.

Is it possible to know why ? for me that make no sense.

 

Thank you for any help.



Viewing all articles
Browse latest Browse all 1645

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>