Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi All,
I apologise if this question has been posted before but to be true, I could not find it. I have a very little question. Please see below Do While some_condition = TRUE '-----Some Code---- If this_condition = TRUE then ' Here I would like to send the execution back to "Do While some_condition = TRUE" ' and bypass all succeeding lines of code End If '-----Some Code---- loop Kindly let me know if this is supported / possible in VBA. Regards Ashish |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Do While some_condition = TRUE
'-----Some Code---- If this_condition = TRUE then 'do nothing else 'some code here End If 'no code here!!!! loop ashish128 wrote: Hi All, I apologise if this question has been posted before but to be true, I could not find it. I have a very little question. Please see below Do While some_condition = TRUE '-----Some Code---- If this_condition = TRUE then ' Here I would like to send the execution back to "Do While some_condition = TRUE" ' and bypass all succeeding lines of code End If '-----Some Code---- loop Kindly let me know if this is supported / possible in VBA. Regards Ashish -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Mar 18, 8:30*pm, Dave Peterson wrote:
Do While some_condition = TRUE * * * '-----Some Code---- * * * *If this_condition = TRUE then * * * * * *'do nothing * * * *else * * * * * *'some code here * * * *End If * * * *'no code here!!!! loop ashish128 wrote: Hi All, I apologise if this question has been posted before but to be true, I could not find it. I have a very little question. Please see below Do While some_condition = TRUE * * * '-----Some Code---- * * * *If this_condition = TRUE then * * * * * * * ' Here I would like to send the execution back to "Do While some_condition = TRUE" * * * * * * * ' and bypass all succeeding lines of code * * * *End If * * * '-----Some Code---- loop Kindly let me know if this is supported / possible in VBA. Regards Ashish -- Dave Peterson- Hide quoted text - - Show quoted text - Hi Dave, I know this will work but I cannot do this. I just want to stop execution and return it to loop checking condition. Besides this, I need to apply this at several places in my loop. Thanks for your help |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Mar 18, 8:30*pm, Dave Peterson wrote:
Do While some_condition = TRUE * * * '-----Some Code---- * * * *If this_condition = TRUE then * * * * * *'do nothing * * * *else * * * * * *'some code here * * * *End If * * * *'no code here!!!! loop ashish128 wrote: Hi All, I apologise if this question has been posted before but to be true, I could not find it. I have a very little question. Please see below Do While some_condition = TRUE * * * '-----Some Code---- * * * *If this_condition = TRUE then * * * * * * * ' Here I would like to send the execution back to "Do While some_condition = TRUE" * * * * * * * ' and bypass all succeeding lines of code * * * *End If * * * '-----Some Code---- loop Kindly let me know if this is supported / possible in VBA. Regards Ashish -- Dave Peterson- Hide quoted text - - Show quoted text - Dear Dave, My question is to break the process flow in middle of a loop and restart it from the loop condition checking. Regards |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You didn't like Rick's reply?
ashish128 wrote: On Mar 18, 8:30 pm, Dave Peterson wrote: Do While some_condition = TRUE '-----Some Code---- If this_condition = TRUE then 'do nothing else 'some code here End If 'no code here!!!! loop ashish128 wrote: Hi All, I apologise if this question has been posted before but to be true, I could not find it. I have a very little question. Please see below Do While some_condition = TRUE '-----Some Code---- If this_condition = TRUE then ' Here I would like to send the execution back to "Do While some_condition = TRUE" ' and bypass all succeeding lines of code End If '-----Some Code---- loop Kindly let me know if this is supported / possible in VBA. Regards Ashish -- Dave Peterson- Hide quoted text - - Show quoted text - Dear Dave, My question is to break the process flow in middle of a loop and restart it from the loop condition checking. Regards -- Dave Peterson |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Mar 24, 5:35*pm, Dave Peterson wrote:
You didn't like Rick's reply? ashish128 wrote: On Mar 18, 8:30 pm, Dave Peterson wrote: Do While some_condition = TRUE * * * '-----Some Code---- * * * *If this_condition = TRUE then * * * * * *'do nothing * * * *else * * * * * *'some code here * * * *End If * * * *'no code here!!!! loop ashish128 wrote: Hi All, I apologise if this question has been posted before but to be true, I could not find it. I have a very little question. Please see below Do While some_condition = TRUE * * * '-----Some Code---- * * * *If this_condition = TRUE then * * * * * * * ' Here I would like to send the execution back to "Do While some_condition = TRUE" * * * * * * * ' and bypass all succeeding lines of code * * * *End If * * * '-----Some Code---- loop Kindly let me know if this is supported / possible in VBA. Regards Ashish -- Dave Peterson- Hide quoted text - - Show quoted text - Dear Dave, My question is to break the process flow in middle of a loop and restart it from the loop condition checking. Regards -- Dave Peterson- Hide quoted text - - Show quoted text - Dear Dave, I must say that there is some problem with the GUI. My post says 6 messages but I cannot view more than 4 (two mine and two of yours) Therefore I dont even know if Rick has suggested some solution. Please convey my apologies to Rick (If you can) as I cannot see a single post of his. Thank You. Regards |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hoping that you will be able to see this response from me, here is what I
posted originally... You could use a Label Statement and a GoTo statement like this... Do While some_condition = TRUE '-----Some Code---- If this_condition = TRUE then GoTo Continue '-----Some Code---- Continue: Loop Please indicate if you can see this message. If Ashish doesn't respond in a reasonable time period, will someone be kind enough to copy and post it back to Ashish for me. Rick "ashish128" wrote in message ... On Mar 24, 5:35 pm, Dave Peterson wrote: You didn't like Rick's reply? ashish128 wrote: On Mar 18, 8:30 pm, Dave Peterson wrote: Do While some_condition = TRUE '-----Some Code---- If this_condition = TRUE then 'do nothing else 'some code here End If 'no code here!!!! loop ashish128 wrote: Hi All, I apologise if this question has been posted before but to be true, I could not find it. I have a very little question. Please see below Do While some_condition = TRUE '-----Some Code---- If this_condition = TRUE then ' Here I would like to send the execution back to "Do While some_condition = TRUE" ' and bypass all succeeding lines of code End If '-----Some Code---- loop Kindly let me know if this is supported / possible in VBA. Regards Ashish -- Dave Peterson- Hide quoted text - - Show quoted text - Dear Dave, My question is to break the process flow in middle of a loop and restart it from the loop condition checking. Regards -- Dave Peterson- Hide quoted text - - Show quoted text - Dear Dave, I must say that there is some problem with the GUI. My post says 6 messages but I cannot view more than 4 (two mine and two of yours) Therefore I dont even know if Rick has suggested some solution. Please convey my apologies to Rick (If you can) as I cannot see a single post of his. Thank You. Regards |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You could use a Label Statement and a GoTo statement like this...
Do While some_condition = TRUE '-----Some Code---- If this_condition = TRUE then GoTo Continue '-----Some Code---- Continue: Loop Rick "ashish128" wrote in message ... Hi All, I apologise if this question has been posted before but to be true, I could not find it. I have a very little question. Please see below Do While some_condition = TRUE '-----Some Code---- If this_condition = TRUE then ' Here I would like to send the execution back to "Do While some_condition = TRUE" ' and bypass all succeeding lines of code End If '-----Some Code---- loop Kindly let me know if this is supported / possible in VBA. Regards Ashish |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Loop through column(s) to check values, perform action based on check | Excel Programming | |||
Add a second condition to loop | Excel Programming | |||
Loop or condition? To check down the rows | Excel Programming | |||
Using For loop to condition | Excel Programming | |||
two-condition loop | Excel Programming |