Hello Everyone Good Afternoon.
I Hope Someone Helps me with my Problem.
I have 3 Textboxes and they are:
GrandTotal.Text
VatAmount.Text
TotalAmount.Text
and 1 `NumericUpdown1.Value`
Here is the Scenario, As the system goes, there is a code that will trigger and Will put a Number value in `GrandTotal.Text` and after that, The User will press `NumericUpdown1.Value`. Every time the user press it A computation will be triggered and a Number value will be Displayed in `TotalAmount.Text` and `VatAmount.Text`
To Make it more specific it is like a computation form that will include VAT. For Example.
`Grandtotal.text = 2000`
and if I press the NumericUpDown to + 1
`VatAmount.Text` = 20 and `TotalAmount.Text` = 2020
I hope you get what I mean
and Here is my code for It:
Private Sub NumericUpDown1_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NumericUpDown1.ValueChanged
VatAmount.Text = Val(Grandtotal.text) * NumericUpDown1.Value * 0.01
End Sub
Private Sub VatAmount_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles VatAmount.TextChanged
TotalAmount.Text = Val(VatAmount.Text) + Val(TextBox14.Text)
End Sub
Now I`m done Explaining it here is My Question.
How to put Commas on that Textboxes and Compute It? My Prof. asked that He wants to put commas on the numbers that will bi inputted? No need to literally put Commas. Put it Automatically when value is greater that 3 Digits
How can I put commas in Textboxes and Compute it using the NumericUpdown?
What I have tried:
I tried to Search and Code it but It cant Give what I needed