This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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