ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   exit while? (https://www.excelbanter.com/excel-programming/315946-exit-while.html)

Steven Deng

exit while?
 
Hello, I realize that there are "exit do", "exit for" in vba, is there a
particular reason that vba does not support "exit while"? Seems that i will
have to "goto" instead.

Sincerely,
Steven Deng





Rob van Gelder[_4_]

exit while?
 
There is no "exit from while" equivalent statement.

I suggest you use Do / Loop instead. You can have conditions at the Do end
or Loop end and use Exit Do

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Steven Deng" wrote in message
news:8yUid.132683$%k.24801@pd7tw2no...
Hello, I realize that there are "exit do", "exit for" in vba, is there a
particular reason that vba does not support "exit while"? Seems that i
will
have to "goto" instead.

Sincerely,
Steven Deng








All times are GMT +1. The time now is 04:15 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com