• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 549
  • Last Modified:

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
0
SameerMirza
Asked:
SameerMirza
1 Solution
 
Rory ArchibaldCommented:
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

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now