Is there a break statement in VBA

  • Thread starter Thread starter Shani
  • Start date Start date
S

Shani

What statement can i use to break out of a loop?

how do i call a procdedure?

How do i declare a universal variable that all sub() can use?

appreciate the help. Thanks
 
(a) Search XL VBA help (or I imagine Word VBA or PP VBA or Access VBA or...)
for 'loop' (w/o the quotes). One of the suggested topics will be
'Do..Loop' Look it up and you'll find the way to break out of a loop

(b) See the XL VBA topic 'Calling Sub and Function Procedures'

(c) Search XL VBA help for 'universal variable' (w/o the quotes). One of
the suggested topics will be 'Understanding the Lifetime of Variables'

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
 
If using a universal variable (static, public), be sure to exit your
procedure by falling thru the "End Sub" or using and "Exit Sub". The "End"
statement resets variables.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top