|
-
Jun 19th, 2012, 01:02 PM
#1
Thread Starter
Member
Upgrade error: 'Goto xxx' is is not valid because 'xxx' is inside a 'For' or '
Hi guys,
i'm upgrading some big chunks of vb6 codes into .NET and I'm getting a few
errors like this one below:
Error 40 'GoTo xxx' is not valid because 'xxx' is inside a 'For' or 'For Each' statement that does not contain this statement.
Now, I know that it's bad practice to use Goto in the first place(spaghetti all over)..but I got the code as it is. i didn't write it. i just try to upgrade it and get it to work..
I think one solution to use a Sub/function to do this.?
Problem is there are some hundreds of lines of code under 'xxx' and I think there are many variables to take care of.
I'm just wondering, whether there's a way maybe by replacing 'For' loop with 'Do while ' that'll get rid of this error?? please let me know
Thanks.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|