Examples: Const statement
Example 1
Const x = 123.45 ' Define a Double constant.
Const y = 123 ' Define an Integer constant.
Const z = 123456 ' Define a Long constant. The value is too
' large to define an Integer constant.
Example 2
' Define a String constant, firstName.
Const firstName$ = "Andrea"
' Define a Single constant, appInterest.
Const appInterest! = 0.125
' Define a Currency constant, appLoan.
Const appLoan@
= 4350.20 ' Display a message about the amount of interest owed. MessageBox firstName$ & " owes " _ & Format(appLoan@ * appInterest!, "Currency")