Machsupport Forum
Mach Discussion => VB and the development of wizards => Topic started by: geast on February 06, 2014, 03:24:15 AM
-
A very strange error only in windows XP
I write a simple macro in windows XP
Dim Y As Integer
Dim A As Double
Y = 1000
A = 1234
aaa= GetUserDRO(1000)
SetUserDRO(Y,A)
and when i executed in windows vista everything is ok, but when in XP i have an error Internal error <SetUserDRO>.
Please check the attached pictures(http://)
-
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
-
None worked, either the parenthesis nor the Call, or the 123.4
Any other ideas?
-
try taking out the explicit typing of A and Y i.e. remove the two DIMs also remove the call to getUserDRO as it's not doing anything at the moment.
-
No luck, i attach the pictures, as simple as it gets.
The mach version im using is R3.043.022.
-
Best I can suggest is you try a re-install of Mach - maybe ENABLE40.DLL got corrupted but that's clutching at straws. I'm on the same Mach version and XP.
-
Yes after a fresh installation, now i'm running R03.043.066 everything works fine. Thanks alot.
-
Cool. In that case I suspect your original version (022) would also be fine after a re-install. Anyway - you're up and running so thanks for getting back.