code:
----------
Private Sub cmdAdd_Click()
On Error GoTo errmsg
// main code: calculation work perform here.
On Error GoTo 0
errmsg:
MsgBox "Adding can't execute due to the textbox is empty.", vbOKOnly
End Sub
The purpose of the code above is to handle error when there is a
error the messange box will pop out.
However, the above code always pop up the message box even there is
not error occurs.