I have declared a variable 'Z' in a procedure I am running, I want it to be displayed in a MsgBox with as a percentage with two decimal places.
The code I have is:
Dim Z As Variant
MsgBox "The Homogeneity of the Batch Model is:" & vbCrLf & vbCrLf & _
" " & Z & "%", vbOKOnly, "Homogeneity Results"
When I use this code it brings up the number Z as XX.X...X%
How do I set it so that it displays as XX.XX% with just the two decimal places?
The code I have is:
Dim Z As Variant
MsgBox "The Homogeneity of the Batch Model is:" & vbCrLf & vbCrLf & _
" " & Z & "%", vbOKOnly, "Homogeneity Results"
When I use this code it brings up the number Z as XX.X...X%
How do I set it so that it displays as XX.XX% with just the two decimal places?