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

VB10 whole number to percent

$
0
0
I got a web application project I'm working on. I have a txtMarkup that you enter a whole number like 2 but I need the math to be worked out like a percent (.02)

I've tired Dim Markup as decimal = CDec(Formatnumber( txtMarkup.Text, 2) and some other combos but with no luck. I'll give you some more of the code I got

Dim Cost as Decimal = CDec(txtCost.Text)
Dim Markup as decimal = CDec(Formatnumber( txtMarkup.Text, 2) ' This is the part I need....
Dim Price as Decimal = Cost * Markup


txtTotalCost.Text = FormatCurrancy(Price)

Its pretty simple but I'm still learning and would appreciate the help!

Viewing all articles
Browse latest Browse all 27230

Trending Articles



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