Type Mismatch Error Follow
I have a function named ConvertModName. This is in the Label Format Options -> VB Scripting -> Functions and Subs
Public Function ConvertModName(PreConvName)
Select Case PreConvName
Case "B" ConvertModName = CStr("AI2-TC")
Case "C" ConvertModName = CStr("AI2-DC")
Case Else ConvertModName = CStr(PreConvName)
Then in the OnAutoSelectedEvent script for a text object I have code:
Value = ConvertModName(Field("BARTEND.008"))
When the script tries to process I get a type mismatch error.
However, if I was to move the function to Function and Subs event under the text object it works.
I thought by putting my function in Label Format -> VB Scripting I would make it global but perhaps that is not the way.
Thanks for any help.