What is the syntax to format number output?

 Format(<value>, "<formatting convention>")
'example - outputs 2
decimalNum = 2.31321
Msgbox Format(decimalNum, "0")

 

Advertisements

What is the syntax to cast to an integer?

<variable holding integer> = Int(<value that needs to be cast>)
'examples
MsgBox(Int("001")) 'produces 1
MsgBox(Int(12.1)) 'produces 12