Assigning Values to Variables : Variable « Language Basics « VBA / Excel / Access / Word






Assigning Values to Variables

 
 Sub CalcCost()
        slsPrice = 35
        slsTax = 0.085
        cost = slsPrice + (slsPrice * slsTax)
    
        strMsg = "The calculator total is " & "$" & cost & "."
        MsgBox strMsg
End Sub            

 








Related examples in the same category

1.Using Variables
2.declare several variables on the same line, separating each variable name with a comma