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
SameerMirzaAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Rory ArchibaldConnect With a Mentor Commented:
Wend is the correct syntax for 'End While'
Do...Loop is generally more useful, IMO.
0
 
ukerandiCommented:
use for loop
you can use exit for key word

yes While wend is more correct one @rorya said
0
 
SameerMirzaAuthor Commented:
Many thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.