S.N Statements and Description Example Dim number As Integer 1 Dim Statement Dim quantity As Integer = 100 Dim message As String = Declares and allocates storage for one or more variables. Const maximum As Long = 1000 2 Const Statement Const naturalLogBase As Declares and defines one or more Object constants. = CDec(2.7182818284) Enum CoffeeMugSize 3 Enum Statement Declares an enumeration and defines ExtraLarge the values of its members. Large Medium Small End Enum 4 Class Statement Box Public length As Double Declares the name of a class and Public breadth As Double introduces the definition of the Public height As Double variables, properties, events, and End Class procedures that the class comprises. 5 Structure Statement Structure Box Public length As Double Declares the name of a structure and Public breadth As Double introduces the definition of the Public height As Double variables, properties, events, and End Structure procedures that the structure comprises. 6 Module Statement Public Module myModule Sub Main() Declares the name of a module and Dim user As String = introduces the definition of the InputBox("What is your name?") variables, properties, events, and MsgBox("User name is" & user) End Sub
S.N Statements and Description Example 1 Dim Statement Declares and allocates storage for one or more variables. Dim number As Integer Dim quantity As Integer = 100 Dim message As String = 2 Const Statement Declares and defines one or more constants. Const maximum As Long = 1000 Const naturalLogBase As Object = CDec(2.7182818284) 3 Enum Statement Declares an enumeration and defines the values of its members. Enum CoffeeMugSize ExtraLarge Large Medium Small End Enum 4 Class Statement Declares the name of a class and introduces the definition of the variables, properties, events, and procedures that the class comprises. Box Public length As Double Public breadth As Double Public height As Double End Class 5 Structure Statement Declares the name of a structure and introduces the definition of the variables, properties, events, and procedures that the structure comprises. Structure Box Public length As Double Public breadth As Double Public height As Double End Structure 6 Module Statement Declares the name of a module and introduces the definition of the variables, properties, events, and Public Module myModule Sub Main() Dim user As String = InputBox("What is your name?") MsgBox("User name is" & user) End Sub