hello

i need some help regarding my coding.

i want to change the number to be like this = 1.00 .

here is my coding:

Private iTotal As Decimal
    Private Sub btnseringgit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnseringgit.Click
        displayText.Text = "RM 1.00"
        displayText.Text = iTotal
        iTotal = iTotal + 1.0
    End Sub

hey this is nothing bt a simple code to just count the no of clicks on that button there is a button nad a label named as "btnseringgit" and "displaytext" so on clicking tabel text changed to no of times u clicked the button.. ok

hey sry .. i didn't read this full nw i will give u the solution wait

Private iTotal As Decimal = "1.00"

Private Sub btnseringgit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnseringgit.Click

displayText.Text = iTotal

iTotal = iTotal + 1
displayText.Text = Convert.ToString(iTotal)

End Sub

here is the solution

thank you for the solution. i really appreciate it. thanks again

its ok buddy

also i want to ask about this code again and its similar to the above but a different code.

here it is:

Private Sub btnsepuluhsen_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsepuluhsen.Click
        displayText.Text = "RM 0.10"
        displayText.Text = iTotal
        iTotal = iTotal + 0.1
    End Sub
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.