Sub CommandButton3_Click()
Dim workrange As Range, sht As Worksheet, NumAreas As Long
Dim i As Long
Set sht = Sheets("sheet1")
If MsgBox("Ban chac chan muon xoa du lieu chu?" & vbCrLf & vbCrLf _
& "Ban chi co the phuc hoi mot lan. Ban co muon tiep tuc?", 64 + 4, "Xac nhan thong tin") <> 6 Then Exit Sub
Range("B3:E322,G3:G322").Select
Set workrange = Selection
sht.Range(workrange.Address).Clear
If TypeName(Selection) <> "Range" Then
MsgBox "Xin hay chon vung ban muon xoa.", vbExclamation
Exit Sub
End If
NumAreas = workrange.Areas.Count
For i = 1 To NumAreas
workrange.Areas(i).Copy sht.Range(workrange.Areas(i).Address)
Next
workrange.ClearContents
Application.OnUndo "Undo ClearContents", "UndoClearContents"
End Sub