Page 1 of 1

progress percentage between two amounts ?

Posted: Sun Sep 24, 2017 2:13 pm
by Dummy1912
Hello,

Can someone help me with this piece :)

we have for example 2 amounts

first one will be 15.000.00
second one will be 750.00

how can we get the percentage to set with progressbar value? to fill up the bar
to see how far we get with the payment

when offcource payed everything we must get 100%
so the progressbar will be full :D

Thanks

Re: progress percentage between two amounts ?

Posted: Sun Sep 24, 2017 4:50 pm
by CodenStuff
Quickly coded, hope this helps:
Code: Select all
Dim SetAmount = "15.000.00"
        Dim CurrentAmount = "750.00"
        ProgressBar1.Value = (100 * CurrentAmount.Replace("."c, "")) / SetAmount.Replace("."c, "")

Re: progress percentage between two amounts ?

Posted: Sun Sep 24, 2017 4:56 pm
by Dummy1912
:lover; :lover; :lover;
Awesome Codenstuff

Thanks ;)