LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 155
Default if condition skip to next line of code

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
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Skip a statment or line in vba Cue Excel Discussion (Misc queries) 5 June 29th 08 12:47 AM
Skip code Patrick Simonds Excel Programming 1 December 30th 06 03:31 PM
How, on a line chart, to skip blank entry rather than plot as 0? JohnTerp Charts and Charting in Excel 1 July 12th 06 11:11 PM
skip some code davegb Excel Programming 5 December 1st 05 05:22 PM
skip code monika Excel Programming 1 February 26th 04 02:33 AM


All times are GMT +1. The time now is 03:30 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"