'Try' statements are not valid in the Immediate window

Try statements can only be used in source code.

Error ID: BC30717

To correct this error

  • Remove Try statements from debugging code.

See Also

Reference

Try...Catch...Finally Statement (Visual Basic)

Other Resources

Debugging in Visual Studio