Private Sub cancle_Click()
Unload Me
End Sub
Private Sub clear_Click()
Me.TextBox1 = ""
Me.TextBox2 = ""
Me.TextBox3 = ""
End Sub
Private Sub save_Click()
Dim sh As Long
sh = Application.WorksheetFunction.CountA(Sheet1.Range("A:A")) + 1
Sheet1.Range("A" & sh).Value = Me.TextBox1.Value
Sheet1.Range("A" & sh).Offset(0, 1).Value = Me.TextBox2.Value
Sheet1.Range("A" & sh).Offset(0, 2).Value = Me.TextBox3.Value
Me.ComboBox1.RowSource = "Sheet1!A2:A" & sh
Call clear_Click
End Sub
Private Sub UserForm_Initialize()
Dim sh As Long
sh = Application.WorksheetFunction.CountA(Sheet1.Range("A:A")) + 1
Me.ComboBox1.RowSource = "Sheet1!A2:A" & sh
End Sub
Unload Me
End Sub
Private Sub clear_Click()
Me.TextBox1 = ""
Me.TextBox2 = ""
Me.TextBox3 = ""
End Sub
Private Sub save_Click()
Dim sh As Long
sh = Application.WorksheetFunction.CountA(Sheet1.Range("A:A")) + 1
Sheet1.Range("A" & sh).Value = Me.TextBox1.Value
Sheet1.Range("A" & sh).Offset(0, 1).Value = Me.TextBox2.Value
Sheet1.Range("A" & sh).Offset(0, 2).Value = Me.TextBox3.Value
Me.ComboBox1.RowSource = "Sheet1!A2:A" & sh
Call clear_Click
End Sub
Private Sub UserForm_Initialize()
Dim sh As Long
sh = Application.WorksheetFunction.CountA(Sheet1.Range("A:A")) + 1
Me.ComboBox1.RowSource = "Sheet1!A2:A" & sh
End Sub