RunGlobalProcedureOnTrigger

I have never been able to get this built in function to work for me.

Here is something simple that I created to increment a counter. It doesn't work for me. Where is my error?

I run this procedure in the startup task. The DidRun tags indicates success.
$DidRun = $RunGlobalProcedureOnTrigger("Second","PopMsg")

But MyCountTest tag does not increment.

Here is my simple procedure;

Sub PopMsg(Receiver)
$MyCountTest = $MyCountTest + 1
End Sub

Thanks, Tom