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: 18
Default Skip LOC in D While Loop

Hi all,
Can anyone tell me if the below scenario is possible. I'm trying to
do this using Excel VBA. Basically if results equals to zero, I do
not want any of the next lines of code to be executed and the code to
loop again. I know I can simply use a GoTO statement using a label
but trying to avoid spaghetti code. Any suggestions please


Function abc As String

Do while (condition is not met)

code line 1
code line 2
results = code line 3

if (results = 0) = True Then goto end of Loop

code line 4
code line 5
code line 6

Loop

End Function


Thank you
Khurram

 
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
For Each Loop skip using user-defined type? [email protected] Excel Programming 0 November 20th 06 09:08 PM
Advancing outer Loop Based on criteria of inner loop ExcelMonkey Excel Programming 1 August 15th 05 05:23 PM
Problem adding charts using Do-Loop Until loop Chris Bromley[_2_] Excel Programming 2 May 23rd 05 01:31 PM
Skip to Next "x" inside of a For Next Loop verizon Excel Programming 9 June 3rd 04 07:34 AM
How to skip numbers in a for next loop hotherps[_28_] Excel Programming 4 February 26th 04 02:03 PM


All times are GMT +1. The time now is 08:51 AM.

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"