What is variable declaration in programming

    how to declare a variable in vb
    how to declare a variable in vba
    how to declare a variable in vb.net
    how to declare a variable in vbscript
  • How to declare a variable in vb
  • Variable declaration example...

    Variable in visual basic

  • Variables in visual basic 6.0 pdf
  • Variable declaration example
  • Types of variables in visual basic
  • Examples of variables in visual basic
  • Declaring variables

    When declaring variables, you usually use a Dim statement. A declaration statement can be placed within a procedure to create a procedure-level variable. Or it may be placed at the top of a module, in the Declarations section, to create a module-level variable.

    The following example creates the variable and specifies the String data type.

    If this statement appears within a procedure, the variable can be used only in that procedure.

    If the statement appears in the Declarations section of the module, the variable is available to all procedures within the module, but not to procedures in other modules in the project.

    To make this variable available to all procedures in the project, precede it with the Public statement, as in the following example:

    For information about naming your variables, see Visual Basic naming rules.

    Variables can be declared as one of the following data types: Boolean, Byte, Integer, Long, Currency, Single, Double, Date, String (for variable-length strings), String * length (for fixed-length strings), Object

      how to create a variable in vb
      how to declare a global variable in vba