Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27514

VS 2012 Label Text. Add .00 If Whole Number

$
0
0
Hi Guys,

Wondering if anyone can help, I have a bit of code that says "lblNewValue.Text = "£" & NewValue" New Value is a simple subtraction calculation set to a data type of Double. However I would like to force the .00 on the label if this is a whole number, anyone know how to do this? I've tried using the FormatCurrency (which it is) function built in, but couldn't get it to work and I'm not sure how the Format() works. I tried Format(lblNewValue.Text, "standard") and Format(lblNewValue.Text,"£##.00") but no luck.

Any advice is appreciated

Thanks,
Ryan

Viewing all articles
Browse latest Browse all 27514

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>