Hi,
have the code below for adding new vendors, how it can be modified that and add a new button in the form just for updating new information in existing verndor on any the textboxes.
Code for adding:
have the code below for adding new vendors, how it can be modified that and add a new button in the form just for updating new information in existing verndor on any the textboxes.
Code for adding:
VBA Code:
Private Sub CommandButton4_Click()
Dim lastrow As Long
lastrow = Sheets("Sheet1").Cells(Rows.Count, 1).End(xlUp).Row + 1
Sheets("Sheet1").Cells(lastrow, 1).Value = Me.TextBox1.Value
Sheets("Sheet1").Cells(lastrow, 2).Value = Me.TextBox5.Value
Sheets("Sheet1").Cells(lastrow, 3).Value = Me.TextBox2.Value
Sheets("Sheet1").Cells(lastrow, 4).Value = Me.TextBox3.Value
Sheets("Sheet1").Cells(lastrow, 5).Value = Me.TextBox4.Value
MsgBox " Data sucessfully Add"
Me.TextBox1.Value = ""
Me.TextBox2.Value = ""
Me.TextBox3.Value = ""
Me.TextBox4.Value = ""
End Sub