Solved

Exit while in vba - not working

Posted on 2011-09-30
3
537 Views
Last Modified: 2012-05-12
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
Comment
Question by:SameerMirza
3 Comments
 
LVL 85

Accepted Solution

by:
Rory Archibald earned 500 total points
ID: 36891585
Wend is the correct syntax for 'End While'
Do...Loop is generally more useful, IMO.
0
 
LVL 10

Expert Comment

by:ukerandi
ID: 36892411
use for loop
you can use exit for key word

yes While wend is more correct one @rorya said
0
 

Author Closing Comment

by:SameerMirza
ID: 36892563
Many thanks
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now