Private Sub Sua_Click()
Dim SHS As Long
Dim ran As Range
Dim roww As Long
[COLOR=#ff0000]dim xacnhan as string
xacnhan = msgbox("Chac xoa khong",vbYesNo,"Xac nhan xoa")
if xacnhan = vbyes then[/COLOR]
SHS = T_SHS.Value
For Each ran In Worksheets("Capnhat").Range("A3:A6500")
If ran = SHS Then
roww = ran.Row
Exit For
End If
Next
If roww = 0 Then
MsgBox "chua chon doi tuong sua du lieu"
Exit Sub
End If
Cells(roww, 1) = T_SHS.Value
Cells(roww, 2) = T_NgayGui.Value
Cells(roww, 3) = T_NgayNhan.Value
Cells(roww, 4) = T_SoPhieu.Value
Cells(roww, 5) = C_NoiGui.Text
Cells(roww, 6) = T_HoSo.Text
Cells(roww, 7) = T_DonVi.Text
Cells(roww, 8) = T_PVCT.Text
Cells(roww, 9) = T_TenNguoiSuuTra.Text
Cells(roww, 10) = T_TenKhac.Text
Cells(roww, 11) = C_GioiTinh.Text
Cells(roww, 12) = T_NamSinh1.Value
Cells(roww, 13) = T_NoiSinh.Text
Cells(roww, 14) = T_QueQuan.Text
Cells(roww, 15) = T_NgheNghiep.Text
Cells(roww, 16) = T_CongTac.Text
Cells(roww, 17) = T_HoKhau.Text
Cells(roww, 18) = T_ChucVu.Text
Cells(roww, 19) = T_VoChong.Text
Cells(roww, 20) = T_NamSinh2.Value
Cells(roww, 21) = T_TenCha.Text
Cells(roww, 22) = T_NamSinh3.Value
Cells(roww, 23) = T_TenMe.Text
Cells(roww, 24) = T_NamSinh4.Value
Cells(roww, 25) = T_QuanHe.Text
Cells(roww, 26) = T_LichSu.Text
Cells(roww, 27) = T_KetQua.Text
Cells(roww, 28) = T_NgayXM.Value
'-------------------
T_NgayGui.Value = ""
T_NgayNhan.Value = ""
T_SoPhieu.Value = ""
C_NoiGui.Text = ""
T_HoSo.Text = ""
T_DonVi.Text = ""
T_PVCT.Text = ""
T_TenNguoiSuuTra.Text = ""
T_TenKhac.Text = ""
C_GioiTinh.Text = ""
T_NamSinh1.Value = ""
T_NoiSinh.Text = ""
T_QueQuan.Text = ""
T_NgheNghiep.Text = ""
T_CongTac.Text = ""
T_HoKhau.Text = ""
T_ChucVu.Text = ""
T_VoChong.Text = ""
T_TenCha.Text = ""
T_NamSinh3.Value = ""
T_TenMe.Text = ""
T_NamSinh4.Value = ""
T_QuanHe.Text = ""
T_LichSu.Text = ""
T_KetQua.Text = ""
T_NgayXM.Value = ""
T_NgayGui.Value = ""
[COLOR=#ff0000]end if[/COLOR]
End Sub