View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
p45cal[_50_] p45cal[_50_] is offline
external usenet poster
 
Posts: 107
Default if condition skip to next line of code

To do nothing? Have no code. Simply remove the line:
Exit Sub
--
p45cal


"Carlee" wrote:

hello all,

I am using the following if statement to evaluate conditions on my user
form. My problem is how to handle if a text box has the value 0, i want the
system to do nothing, and move to the next condition evaluation. Using Exit
Sub busts right out of the block of code, and that isn't what works. How can
i do this?


If Me.txtNearMiss.Value = "0" Then
exit sub
ElseIf Not (Me.txtNearMiss.Value = "") And Me.txtDescNearMiss.Value = "" Then
MsgBox "A value has been identified in the Near Miss Incidents field. A
description of each incident is required."
End if






--
Carlee