VISUAL BASIC

VISUAL PROGRAMMING

VISUAL BASIC

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
What is the variable name?’Dim Name as String’
A
Name
B
String
C
Dim
D
As
Explanation: 

Detailed explanation-1: -A string variable is identified with a variable name that ends with the $ character. A string array variable has the $ character just before the left bracket that holds the array index. The variable name must begin with a letter and consist of 30 or fewer characters, including the $ character.

Detailed explanation-2: -A string variable is a variable that holds a character string. It is a section of memory that has been given a name by the programmer. The name looks like those variable names you have seen so far, except that the name of a string variable ends with a dollar sign, $. The $ is part of the name.

Detailed explanation-3: -Now if we declare Y as a string it means we can store string values in Y. As discussed above DIM in VBA is used to declare variables of different data types. But what is DIM in VBA? DIM means dimension or Declare in Memory in VBA. We declare a variable to a specific data type in VBA we use the DIM keyword to do it.

Detailed explanation-4: -A variable is a symbolic name for (or reference to) information. The variable’s name represents what information the variable contains. They are called variables because the represented information can change but the operations on the variable remain the same.

Detailed explanation-5: -What is the VBA DIM Statement? VBA DIM statement stands for “declare” that you must use when you need to declare a variable. When you use it, it tells VBA that you are declaring a specific name as a variable as assigning a specific data type to it. It can be used to declare the following: Basic Variables.

Detailed explanation-6: -A variable name must start with a letter or an underscore character ( ) A variable name cannot start with a digit. A variable name can only contain alpha-numeric characters and underscores ( a-z, A-Z, 0-9, and ) Variable names are case-sensitive (age, Age and AGE are three different variables)

There is 1 question to complete.