02-19-2013 02:42 PM
Hi All,
I am having trouble using the 'Goto' and 'Continue For' lines in DIAdem script. Does anyone know if these are disabled in DIAdem or if I am doing something wrong. Take these examples below for instance:
Goto:
option explicit dim a,b b="" for a=1 to 50 if a=10 then goto Printer b=b&" "&a next 'a Printer: msgbox(b)
reports an error directly after the 'goto' text
Continue:
option explicit dim a,b b="" for a=1 to 50 if a=10 then continue for b=b&" "&a next 'a Printer: msgbox(b)
Reports an error right after the 'continue' text.
Please shed some light on this. Thanks!
Solved! Go to Solution.
02-20-2013 12:45 AM
Hello GT_Mark,
In VBS is "GoTo" only associated with "On Error Resume Next". In all other cases "GoTo" and "Continue" are not part of the VBS command set. (Please keep in mind that DIAdem supports VBS and not VBA or VB.) Your example can be changed as follows:
Option Explicit dim a,b b="" a = 0 do while (a < 10) a = a + 1 b=b&" "&a loop 'a msgbox(b)
Greetings
Walter
02-20-2013 07:07 AM
Thanks for the reply. Unfortunately the workaround you suggest does not work for my particular application. I'm just going to have to reformat the Sub. I think using a Select Case will take care of things for me.
Thanks again for clarifying a difference between VBS and VBA.