Type of mathematical Formula :-
1) Addition
2) Subtraction
3) Multiplication
4) Division
5) Complex
1) Addition :-
First of make a Form in MS Excel User Form . If you do't know that the who to make the User Form then First of go to the ms Excel windows button . Click the windows button and select the ms excel option button . And Select the Developer Tab option .
When you Select the Developer tab . Developer tab is open in the ms excel title bar.
The Next Process is that Select the Developer tab and go to the Visual Basic option. And Insert the user form .
Next is fallow in given below :-
All the Button is insert Tool box. What type of need.
Textbox automatically charged Module Click Here
Let :- TextBox1 = TextBoxPos_Entry_Qty1
TextBox2 = TextBoxPos_Entry_Qty2
TextBox3 = TextBoxPos_Entry_Qty3
TextBox4 = TextBoxPos_Entry_Total_Qty
CommandButton1 = CommandButtonPos_Entry_Add
User Form is Competed Design then Double Click the Add Command button.
Write the below code:-
Private Sub CommandButtonPos_Entry_Add_Click()
TextBoxPos_Entry_Total_Qty.Value = Val(TextBoxPos_Entry_Qty1.Value) + Val(TextBoxPos_Entry_Qty2.Value)+ Val(TextBoxPos_Entry_Qty3.Value)
End Sub
Result :-
When Run the Program . Text Box is ready to type the Data . But Not type the Total Qty value .
All the data is Filling in the Text box and Click the Add . Text Box Total Qty Text Box is automatic Fill the total value.
All the given description is fallow in the below Mathematical Operation.
2) Subtraction :-
Let:- TextBox1 = TextBoxPos_Entry_Dis1
TextBox2 = TextBoxPos_Entry_Amount
TextBox3 = TextBoxPos_Entry_Total_Amount
CommandButton1 = CommandButtonPos_Entry_Subraction
Private Sub CommandButtonPos_Entry_Subraction_Click()
TextBoxPos_Entry_Total_Amount.Value = Val( TextBoxPos_Entry_Amount.Value) - Val( TextBoxPos_Entry_Dis1.Value)
End Sub
3) Multiplication :-
Let :- TextBox1 = TextBoxPos_Entry_Qty1
TextBox2 = TextBoxPos_Entry_Rate1
TextBox3 = TextBoxPos_Entry_Amount
CommandButton1 = CommandButtonPos_Entry_Multiplication
Private Sub CommandButtonPos_Entry_Multiplication_Click()
TextBoxPos_Entry_Amount.Value = Val(TextBoxPos_Entry_Qty1.Value) * Val(TextBoxPos_Entry_Rate1.Value)
End Sub
4) Division :-
Let:- TextBox1 = TextBoxPos_Entry_Qty1
TextBox2 = TextBoxPos_Entry_Rate1
TextBox3 = TextBoxPos_Entry_Amount
CommandButton1 = CommandButtonPos_Entry_Division
Private Sub CommandButtonPos_Entry_Division_Click()
TextBoxPos_Entry_Amount.Value = Val(TextBoxPos_Entry_Rate1.Value) / Val(TextBoxPos_Entry_Qty1.Value
End Sub
5) Complex :-
Find the Value of Net Amount Maximum Round 2 if Qty and Rate is given.
Let :-
TextBox1 = TextBoxPos_Entry_Qty
TextBox2 = TextBoxPos_Entry_Rate
TextBox3 = TextBoxPos_Entry_Net_Amount
TextBox4 = TextBoxPos_Entry_Discount_Percentage
CommandButton1 = CommandButtonPos_Entry_Complex
Private Sub CommandButtonPos_Entry_Complex_Click()
TextBoxPos_Entry_Net_Amount.Value = ((Round((Val(TextBoxPos_Entry_Qty.Value) * Val(TextBoxPos_Entry_Rate.Value)), 2)) - (((Val(TextBoxPos_Entry_Qty.Value) * Val(TextBoxPos_Entry_Rate.Value)) * Val(TextBoxPos_Entry_Discount_Percentage.Value)) / 100))
TextBox2 = TextBoxPos_Entry_Qty2
TextBox3 = TextBoxPos_Entry_Qty3
TextBox4 = TextBoxPos_Entry_Qty4
TextBox5 = TextBoxPos_Entry_Qty5
TextBox6 = TextBoxPos_Entry_Qty6
Qty1, Qty2, Qty3 date copy in Qty4, Qty5, Qty6
CommandButton1 = CommandButtonPos_Entry_Copy
TextBox2 = TextBoxPos_Entry_Sr_No
TextBox2 = TextBoxPos_Entry_Rate
TextBox3 = TextBoxPos_Entry_Amount
No comments:
Post a Comment