Link to home
Start Free TrialLog in
Avatar of SameerMirza
SameerMirzaFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Exit while in vba - not working

hi,

I am trying to use the exit while statement in VBa but it doesnt seem to pick the syntax, nither for end while

Very new to vba. would be great if any one could let me know whats the right syntax

If a = "" Then Exit While

END while

thanks
ASKER CERTIFIED SOLUTION
Avatar of Arno Koster
Arno Koster
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of SameerMirza

ASKER

true.
I figuered it out. :)
pay attention though that there is a difference in these code fragments :

x = 10
WHILE x < 5
   msgbox "this message will not be displayed"
   x = 25
WEND
DO
   msgbox "this message will be displayed"
LOOP WHILE x < 5

Open in new window

thanks