Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can't get out of loop at the right point
When I say quit, I don't mean I wanted to do a quit.applicatioin, since that
would exit Excel. "Bruce Roberson" wrote in message ... I need to know how to exit the sub in the case below in sub submonth at the end of this section. Basically when the IF statement here is: If Range("Row").Value Range("DataRows").Value Then Exit Sub The command to "exit sub" just sends me back to the calling sub detailloop and the command line "next" is encountered in this situation. Is there a command such as "quit" that allows it to not go back to the calling sub in this case? Sub Process_data() Things happen here only once then Call HeaderRecord End Sub Sub HeaderRecord() Loops and Things happen here then Call detailloop End Sub Sub detailloop() looping going on here then If Range("Row").Value Range("DataRows").Value Then Call summonth Else If Range("New_Prmo") Then Call summonth Else End If End If Next (refers to a loop that is not shown in this post) End Sub Sub summonth() Range("rowsum").Value = Range("Rowsum").Value + 1 If Range("Row").Value Range("DataRows").Value Then Exit Sub Else Call HeaderRecord End If End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Loop | Excel Discussion (Misc queries) | |||
Find loop doesn't loop | Excel Discussion (Misc queries) | |||
Data point on line is not over the point/tick in X axis... | Charts and Charting in Excel | |||
X Y Scatter With Point name on each point ? | Charts and Charting in Excel | |||
I need more general XY point to point plotting than XY scatter in | Charts and Charting in Excel |