Tuesday, April 26, 2011

Variables


·         We’re now ready to attach code to our application.  As objects are added to the form, Visual Basic automatically builds a framework of all event procedures.  We simply add code to the event procedures we want our application to respond to.  But before we do this, we need to discuss variables. 

·         Variables are used by Visual Basic to hold information needed by your application.  Rules used in naming variables:

A variable name:
·          Must begin with a letter.
·          Must not exceed 255 characters
·          Can't contain an embedded period or embedded type-declaration character.
·          Must be unique within the same scope, which is the range from which the variable can be referenced — a procedure, a form, and so on.
·          They may include letters, numbers, and underscore (_)
·          You cannot use a reserved word (word needed by Visual Basic)

No comments:

Post a Comment