• Top Members
    Reps
    Posts
  • 834 Replies
    2585 Replies
  • 716 Replies
    2025 Replies
  • 331 Replies
    1928 Replies

progress percentage between two amounts ?  [SOLVED]

Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Locked
User avatar
Dummy1912
VIP - Donator
Posts: 1960

progress percentage between two amounts ?

Sun Sep 24, 2017 3:13 pm

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

User avatar
CodenStuff
Site Admin
Posts: 4367

Re: progress percentage between two amounts ?  [SOLVED]

Sun Sep 24, 2017 5:50 pm

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, "")
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.


Locked

Return to “Coding Help & Support”