Variable declaration in programming involves declaring a variable name and its data type using the Dim keyword followed by the variable name, data type, and optionally multiple variables separated by commas. An input box allows getting user input at runtime by declaring a variable, then assigning the variable the value returned from an InputBox function along with a prompt string.
1. VARIABLE DECLARATION
Declaring the variable and its data type.
Syntax:
Dim variablename as datatype
Example:
Dim a as Integer
Dim a ,b as Integer
Dim cusname as String
INPUT BOX
Getting the input through input box at run time.
Syntax:
1. Declare the variable for getting Input
2. Variable = InputBox(“ Comment”)
Example
Dim a as Integer
A= Inputbox(“Enter the Integer value “)