Skip to content

Instantly share code, notes, and snippets.

@DuongAQ
Created February 21, 2018 09:07
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
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