Works fine here under XP but usually this CB "internal error" is down to some subtle syntax error. According to VB syntax a procedure call shouldn't have () unless it's called via the CALL keyword. Sometimes it works out ok and sometimes it doesn't. You could try changing line 9 to:
SetUserDRO Y, A
or if you want the parentheses
Call SetUserDRO(Y, A)
Also it's always a good idea to assign explicit real numbers to real variables i.e.
A = 1234.0