Skip to content

Instantly share code, notes, and snippets.

@DuongAQ
Created January 24, 2018 08:43
Show Gist options
  • Save DuongAQ/8c30a0f01ef7455dd31ace2cb0ae4f58 to your computer and use it in GitHub Desktop.
Save DuongAQ/8c30a0f01ef7455dd31ace2cb0ae4f58 to your computer and use it in GitHub Desktop.
Sub ThongBao_XoaDong()
'Xac dinh vi tri dong can xoa
Dim DongXoa As Long
DongXoa = ActiveCell.Row
'Gan bien Thong bao la msgbox
Dim ThongBao As Integer
ThongBao = MsgBox("Ban co chac chan xoa dong " & DongXoa & " khong", vbOKCancel + vbInformation + vbDefaultButton2, "Thong bao")
'Xet cac truong hop khi lua chon trong msgbox
Select Case ThongBao
Case vbOK 'Xac nhan dung noi dung can xoa
Call Lenh_Xoa
Case vbCancel 'Xac nhan khong dung noi dung can xoa
Exit Sub
End Select
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment