Thursday, 6 January 2022

Who to apply Mathematical Formula in MS Excel User Form

 HOME PAGE    

UPSC :-UPSC Prelims 2021 Paper Analysis I Indian Polity             UPSC Prelims 2021 Paper Analysis I Science & Technology                 UPSC Prelims 2021 Paper Analysis I Geography             IAS/PCS Essay Book  Paper Notice and syllabus :PET EXAMINATION SYLLABUS            PET QUESTION PAPER                 SINDHU GHATI SABHYATA                         GST                     B.Ed Second Year Book -2021                            DIGITAL INDIA                    CHILD LABOUR IN INDIA  Competitive Book :- GK/GS Book 2021                              All Competitive Maths Book                    All Competitive Resigning Book            Important Project :-Visual Studio C # Project      Tally Erp9 Account Feature      Microsoft  Excel VBA Project                    who to  apply mathematical Formula in ms excel user form                   MS Excel UserForm Save And Edit Button Part-1 Module          MS Excel UserForm Save And Edit Button Part-2 Module


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

                                   TextBox2TextBoxPos_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))

End Sub



Note :-
       I)    Copy data in one TextBox to another TextBox.

            Let :-
                                  TextBox1 =  TextBoxPos_Entry_Qty1

                                   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 


Private Sub CommandButtonPos_Entry_Copy_Click()


    TextBoxPos_Entry_Qty1.Value =   TextBoxPos_Entry_Qty4.Value
    TextBoxPos_Entry_Qty2.Value =  TextBoxPos_Entry_Qty5.Value
    TextBoxPos_Entry_Qty3.Value = TextBoxPos_Entry_Qty6.Value


End Sub

  
       II) If and Else Statement used in UserForm TaxtBox.

         Let :-
                       TextBox1 =  TextBoxPos_Entry_Qty

                       TextBox2 = TextBoxPos_Entry_Sr_No

                   CommandButton1 =  CommandButtonPos_Entry_Refresh 

 Case I:-  If Refresh Command Button is Click then Sr. No. Show Automatic                       



Private Sub CommandButtonPos_Entry_Refresh_Click()

 If TextBoxPos_Entry_Qty.Value = "" Then
 TextBoxPos_Entry_Sr_No.Value = ""
 Else
 TextBoxPos_Entry_Sr_No.Value = 1
 End If                 

End Sub


Case II:- If Refresh Command Button is Click Then Qty and Rate Given Value is Multiply . When qty and Rate is Not Given Then Amount Value is "" .

          Let:-
                       TextBox1 =  TextBoxPos_Entry_Qty

                       TextBox2 = TextBoxPos_Entry_Rate

                       TextBox3 = TextBoxPos_Entry_Amount

                   CommandButton1 =  CommandButtonPos_Entry_Refresh 



Private Sub CommandButtonPos_Entry_Refresh_Click()


 If TextBoxPos_Entry_Qty.Value = "" Then
TextBoxPos_Entry_Amount .Value = ""
 Else
TextBoxPos_Entry_Amount.Value = Val(TextBoxPos_Entry_Rate.Value) * Val(TextBoxPos_Entry_Qty.Value)
 End If  



No comments:

Post a Comment

Seperation method of Glucose in Sugarcane using HPLC || HPLC का उपयोग करके गन्ने से ग्लूकोज को अलग करने का तरीका

 गन्ने में मौजूद ग्लूकोज (glucose) की मात्रा का विश्लेषण करने के लिए LC-MS एक बहुत ही प्रभावी तरीका है। यह तकनीक दो प्रमुख चरणों में काम करत...