I have a userform that inputs numbers into a spreadsheet, calculates on the spreadsheet and then returns a value in a msgbox. Can I format the result in the message box to only show 3 decimals) "0.000"
Code:
Dim Raws1 As Range, Raws2 As Range, Raws3 As Range
Dim Raws4 As Range, Raws5 As Range, Raws6 As Range
Dim RawMass As Range, MassBal As Variant
Set Raws1 = Sheets("Mass Balance").Range("Raws1")
Set Raws2 = Sheets("Mass Balance").Range("Raws2")
Set Raws3 = Sheets("Mass Balance").Range("Raws3")
Set Raws4 = Sheets("Mass Balance").Range("Raws4")
Set Raws5 = Sheets("Mass Balance").Range("Raws5")
Set Raws6 = Sheets("Mass Balance").Range("Raws6")
Set RawMass = Sheets("Mass Balance").Range("FTIR")
Raws1 = TextBox1.Value
Raws2 = TextBox2.Value
Raws3 = TextBox3.Value
Raws4 = TextBox4.Value
Raws5 = TextBox5.Value
Raws6 = TextBox6.Value
RawMass = TextBox7.Value
Set MassBal = Sheets("Mass Balance").Range("MassBal")
MsgBox ("Mass Balance = " & MassBal)