Private Sub CommandButton1_Click() 'Ðýa DL týÌ TextBox vaÌo sôÒ
Set ws = Worksheets("DS")
iRow = ws.Cells(Rows.Count, 2).End(xlUp).Offset(1, 0).Row
ws.Cells(iRow, 2).Value = Me.TextBox1.Value
ws.Cells(iRow, 3).Value = Me.TextBox2.Value
ws.Cells(iRow, 4).Value = Me.TextBox3.Value
Me.TextBox1.Value = ""
Me.TextBox2.Value = ""
Me.TextBox3.Value = ""
Me.TextBox1.SetFocusActiveWorkbook.Worksheets("DS").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("DS").Sort.SortFields.Add Key:=Range("B2:B65536"), _
SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("DS").Sort
.SetRange Range("B1:D65536")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Unload Me
End Sub