hi all,
i am am working on a tax software that computes tax and gives the amount.since different goods have different tax percentages i would like when one customer buys goods with different tax percentage i can use the subtotal button to temporarily hold the tax value as he computes another and eventually when he presses the total button he gets the sum total of all the taxes.please share any ideas.

Recommended Answers

All 6 Replies

You can use different texbox to do this.

thanks Abu, i tried that option with the code below.yes i can hold the values bt how do i add them to obtain a total?

Private Sub Command1_Click()

If Text1.Text = "" Then
MsgBox "", vbInformation

Label1 = Label1.Caption & vbCr & (Text1.Text * 0.16) & "#" & Text1.Text & Space(2) & "A"

'Text1.Visible = False
'Label1.Visible = True
End If

End Sub

where A is the tax code e.g 16%

You can use variables to hold each value you need. You can make it something like this...

Dim Var1 as Double
Dim Var2 as Double
Dim SubTotal As Double

Var1 = CDbl(Text1.text) * 0.16
Var2 = 0.16
SubTotal = Var1 + Var2 
'Label1 Shows the value of SubTotal
Label1.Caption = SubTotal

Var2 is the tax code e.g 16%, just like that.. Hope it helps...

where A is the tax code e.g 16%

this line is not clear to me. so need more information. did you declare any variable for A? or do you want to calculate 16%?

thanks Jhai u were a great help.
to Abu i had declared A=16%

thanks Jhai u were a great help.
to Abu i had declared A=16%

Your welcome, hope its solves your problem...

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.