Good day everyone,
I am having problem figuring out why my Excel stops working if a cell is empty. What is wrong?
Private Sub CommandButton1_Click()
Application.ScreenUpdating = False
Application.EnableEvents = False
If IsEmpty(ActiveCell) Then
MsgBox "Selected cell is empty. ", vbExclamation, "No Requisition Number"
Unload Me
Exit Sub
End If
'other codes here
Application.ScreenUpdating = True
Application.EnableEvents = True
End Sub
The code just stop working after this is run without anything in the selected cell.
Should I remove something...but what.
The msg pops up but once I have selected "Ok" all codes in my workbook stops working.
Bookmarks