excel vba constant expression required code example
Example: excel vba constant
' Constants are Private by default.
Const MyVar = 459
' Declare Public constant.
Public Const MyString = "HELP"
' Declare Private Integer constant.
Private Const MyInt As Integer = 5
' Declare multiple constants on same line.
Const MyStr = "Hello", MyDouble As Double = 3.4567