Code could not be parsed
TOC
Collapse the table of content
Expand the table of content
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

Code could not be parsed

Visual Studio .NET 2003

In some cases, code that was syntactically incorrect did not cause compilation errors in Visual Basic 6.0. For example, the following code would not cause a compilation error:

Private Sub Form_Click()
   ' Note misspelling of DoEvents.
   DoEventss
End Sub

Visual Basic 6.0 performed incremental compilation; because the code in the Form_Click event would not be compiled until the event was triggered, the syntax error would only be encountered at run time.

In Visual Basic .NET, all code is compiled before the application is run, so syntax errors will always cause a compilation error.

What to do next

  • Modify the code to use the correct syntax.
    Note   If you run your application in Visual Basic 6.0 prior to upgrading using the Start With Full Compile option, you will get compilation errors for any syntax problems.

See Also

Preparing a Visual Basic 6.0 Application for Upgrading

Show:
© 2016 Microsoft