Friday, 7 January 2022

MS Excel UserForm Save and Edit Button Part-1 Module

     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


Save Button Module :-

                                    Fist Create a  table in ms excel user form .  And Set all the Text Boxes Properties.

as like instruction . In this module fist three line is the module of massage. Next of  line in this program is set the Text box filling check up .  

The Next process is that Add the data in the ms excel data sheets. if the data is complete Adding process then the massage box is open . Click the yes Button in the massage box Data is Add successfully.

       User Form Text boxes properties is write below. 


  1) Save Button Module :-

                                          Let :- 

                                      MS Excel Table Sheet Name = Sale

                                      ListBox1 =  ListBoxPos_Entry_Detail

                                      TextBox1 =   Me.TextBoxPos_Entry_Barcode1

                                     TextBox2 =    Me.TextBoxPos_Entry_Qty1

                                    TextBox3 =      Me.TextBoxPos_Entry_Rate1

                                    TextBox4 =       Me.TextBoxPos_Entry_Discount_Percentage1

                                    TextBox5 =      Me.TextBoxPos_Entry_Discount1

                                    TextBox6 =      Me.TextBoxPos_Entry_Taxtable_Value1

                                    TextBox7 =      Me.TextBoxPos_Entry_Amount1

                                     TextBox8 =     Me.TextBoxPos_Entry_Sales_Man1

                                    CommandButton1 = CommandButtonPos_Entry_Save


Private Sub CommandButtonPos_Entry_Save_Click()


Dim MsgValue As VbMsgBoxResult

MsgValue = MsgBox("Do You Want to save the Date?", vbYesNo + vbInformation, "Confirmation")

If MsgValue = vbNo Then Exit Sub


 '''''''''''validation'''''''''''


  If Me.TextBoxPos_Entry_Barcode1.Value = "" Then

      MsgBox "Please Enter the Barcede", vbCritical

       

      Exit Sub

 End If

 

 If IsNumeric(Me.TextBoxPos_Entry_Qty1.Value) = False Then

     MsgBox "Please Enter the Wright Qty", vbCritical

   

     

     Exit Sub

End If


If IsNumeric(Me.TextBoxPos_Entry_Rate1.Value) = False Then

     MsgBox "Please Enter the wright Rate", vbCritical

     Exit Sub

End If


 

 ''''''''''''Add Data

 Dim lr As Integer

 Set sh = ThisWorkbook.Sheets("Sale")

 

 ''1

 

 lr = Application.WorksheetFunction.CountA(sh.Range("A:A"))

 sh.Range("A" & lr + 1).Value = lr

 sh.Range("B" & lr + 1).Value = Me.TextBoxPos_Entry_Barcode1.Value

 sh.Range("C" & lr + 1).Value = Me.TextBoxPos_Entry_Qty1.Value

 sh.Range("D" & lr + 1).Value = Me.TextBoxPos_Entry_Rate1.Value

 sh.Range("E" & lr + 1).Value = Me.TextBoxPos_Entry_Discount_Percentage1.Value

 sh.Range("F" & lr + 1).Value = Me.TextBoxPos_Entry_Discount1.Value

 sh.Range("G" & lr + 1).Value = Me.TextBoxPos_Entry_Taxtable_Value1.Value

 sh.Range("H" & lr + 1).Value = Me.TextBoxPos_Entry_Amount1.Value

 sh.Range("I" & lr + 1).Value = Me.TextBoxPos_Entry_Sales_Man1.Value

 



 '''''''item Clear

 

 Me.TextBoxPos_Entry_Barcode1.Value = ""

 Me.TextBoxPos_Entry_Qty1.Value = ""

 Me.TextBoxPos_Entry_Rate1.Value = ""

 Me.TextBoxPos_Entry_Discount_Percentage1.Value = ""

 Me.TextBoxPos_Entry_Discount1.Value = ""

 Me.TextBoxPos_Entry_Taxtable_Value1.Value = ""

 Me.TextBoxPos_Entry_Amount1.Value = ""

 Me.TextBoxPos_Entry_Sales_Man1.Value = ""


 Call Show_Data


 MsgBox "Product has been added in Product Master", vbInformation


End Sub



 Sub Show_Data()

  Dim sh As Worksheet

 Set sh = ThisWorkbook.Sheets("Sale")

 Dim lr As Integer

 lr = Application.WorksheetFunction.CountA(sh.Range("A:A"))

  If lr = 1 Then lr = 2

 With Me.ListBoxPos_Entry_Detail

 .ColumnCount = 9

 .ColumnHeads = True

 .ColumnWidths = "100,130,130,100,100,100,100,100,100"

 .RowSource = "Sale!A2:I" & lr

 

End With

End Sub


2) Edit Button Module :-

                                        Let :- Module


 Some other topics:-

1. TextBox change Module           

2. TextBox Enter Module  

No comments:

Post a Comment

Synthesis process of thiol || Advance organic synthesis Method

  Synthesis process of thiol (RSH): -   Synthesis process of thiol (RSH):-                                                                In...