boston1685

Label format - special characters

Discussion created by boston1685 on Apr 21, 2010
Latest reply on May 12, 2010 by wharrison-esristaff
I am trying to format a label where the field has a "<" symbol in it.  I'm using the Replace function to try and deal with it but am still not getting the correct ouput.

My output is in the attachment.

Here is my code:

Function FindLabel ( [Sheet1$.PCE], [Sheet1$.DCA], [Sheet1$.DCE], [Sheet1$.Diox] )
  NewStringDCA = "<CLR red='85' green='255' blue='0'>" & Replace([Sheet1$.DCA], "<", "&lt;") & "</CLR>"
  NewStringDCE = Replace([Sheet1$.DCE], "<", "&lt;")
  NewStringDiox = Replace([Sheet1$.Diox], "<", "&lt;")
  FindLabel = [Sheet1$.PCE]  &  vbnewline  &  NewStringDCA &  vbnewline & "<CLR red='255' green='0' blue='0'>" & NewStringDCE  & "</CLR>" & vbnewline & "<CLR red='0' green='112' blue='255'>" & NewStringDiox & "</CLR>"
End Function

I'm sure this is minor but does anyone have any ideas?

Thanks,
Kyle

Attachments

Outcomes