Number formatting in forms
That is clearer. Thanks for the help.
"Incidental" wrote:
Hi Brian
Sorry for the late reply, the code below is shows the value .494213871
as 49% using the format function.
With Mix_Constraints_Form
..comp1_min.Value = Format(Worksheets("Results") _
..Cells(17, 7).Value, "0%")
End With
You can change the format to reflect what you want. I'm not exactly
sure what exactly your aim is with this but i hope you see where i'm
coming from with this. You said in your first post you wanted to show
as one decimal place as well, excel rounds .494213871 up to 0.5 if you
format the cell to one decimal place. You can do that in code like so
With Mix_Constraints_Form
..comp1_min.Value = Format(Worksheets("Results") _
..Cells(17, 7).Value, "0.0")
End With
I hope this is more clear for you
Steve
|