QP School

Full Version: Variables in VBA
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Description:

Variables are used to store and manipulate data in VBA. 
Declare variables using the Dim statement.

Example:

Sub ExampleVariables()
    Dim myName As String
    myName = "John Doe"
    MsgBox "Hello, " & myName & "!"
End Sub