Acc. to your comment:
@KashishArora yes
I will do it in a very very simple way!
Explanation
We will first simply divide Textbox1 with Textbox2 and store the value in a label and then declare an integer a
as label1.text
(it isn't necessary to do it in variable, you can do directly). Then we will use the Math.Round
control and specify the number of decimals we want (1 or 2).
And then finally, store the value of a
back to Label1
.
Code And Example
Label1.Text = Val(TextBox2.Text) / Val(TextBox1.Text)
Dim a As Double = Label1.Text
a = Math.Round(a, 2) '2 is number of decimal places
Label1.Text = a
'All the things you want to do with this.
I hope it works perfectly!