if I understand you right you are using VBA. Unfortunately you have chosen one of the symbols that needs to be "enabled" first. So here is what you would like to write:
Private Sub CommandButton1_Click()
Dim test As Text
Set test = Me.Symbols.Add(pbSymbolText)
test.EnableScript = True
test.Contents = "Test"
Private Sub MySymbol_Click(ByVal lvarX As Long, ByVal lvarY As Long)
Sorry for resurrecting this thread... But I am having the same issue. The test.EnableScript has already been set to true. However nothing happens when click on it. My Processbook version is 18.104.22.1680.
From the code above, Andreas is using an event associated with a symbol called "MySymbol". It works. But what if I have hundreds of symbols in my display? It would be impossible a different sub for all my symbols (MySymbol1_Click, mySymbol2_Click, etc...). So I think the "WithEvents" declaration would do the trick, if it worked (as seen on Kenneth's code). After adding test.EnabvleScript=True, Kenneth's code is still not working.
Could anyone shed a light on this?
I ended up creating a sub to get the name of the clicked object by mapping the mouse X,Y coordinates from the Display_Click event. It may not be the ideal solution, but it works nicely.