Skip to content

Instantly share code, notes, and snippets.

@DuongAQ
Created February 21, 2018 09:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DuongAQ/675c0bffac1097aa9b0e72e69ca8fe0f to your computer and use it in GitHub Desktop.
Save DuongAQ/675c0bffac1097aa9b0e72e69ca8fe0f to your computer and use it in GitHub Desktop.
Sub BayLoi_Test01()
Dim a As Long, b As Long
a = Sheet1.Cells(1, 1).Value
b = Sheet1.Cells(2, 1).Value
On Error GoTo Loi
Sheet1.Cells(3, 1).Value = a / b
MsgBox "ok!"
Loi:
If Err.Number = 11 Then
MsgBox "Loi chia cho 0"
End If
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment