Object error when dynamically changing font color in script. 追蹤

Todd Hansen

Trying to use VBScript to dynamically change the colors of the text on a label. 

I have created this script and have placed it in the Transforms section if the object.

When I try to test the script I receive and error.  “<line 7: : Type mismatch: ‘objects’>

I am list on how to correct his error.

Thanks for any suggestions.


ReferenceField ("WP066009.PFPTXT")

Set Pallet = Objects("Text 10")


If (Field("WP066009.PFPTXT") = "PARTIAL PALLET") Then

   Pallet.TextColor = btColor.Black

   Pallet.TextBackgroundColor = btColor.White


   Pallet.TextColor = btColor.White

   Pallet.TextBackgroundColor = btColor.Black

End If