Share via


The variable '<variable name>' is either undeclared or was never assigned

The source code has a reference to a variable, such as Button1,that was never declared or assigned. If it was not assigned, you will get a warning, not an error.

To correct this error

  • Declare or assign the variable specified in the error message.

See Also

Reference

Programming Concepts Compared in Various Languages, with Code Examples