Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Closing a Sub

Posted on 1998-10-01
6
Medium Priority
?
171 Views
Last Modified: 2013-12-25
I want this to be done:

Sub Hello(var)
...
For each item in DBC do
...
If var2="end" then
     End Sub
End If
Next
...
End Sub

I get an error when it reaches the "End Sub" in the the "If"-statement since it wants a "End If" first. What can I do to skip this?
0
Comment
Question by:EasyQ
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 

Author Comment

by:EasyQ
ID: 1855364
Edited text of question
0
 

Expert Comment

by:shez
ID: 1855365
you may try this:
Sub Hello(var)
    ...
    For each item in DBC do
    ...
    If var2="end" then
         Exit Sub
    End If
    Next
    ...
    End Sub
0
 

Author Comment

by:EasyQ
ID: 1855366
SHAZ. It worked fine! (How could I not know such an easy command) hmm guess it's because I'm self-learned/self-learning. Oh well. If you want your points, just post it as an answer.
As my name says, some thing I ask are EasyQ:s =]


0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Accepted Solution

by:
shez earned 240 total points
ID: 1855367
you may try this:
       Sub Hello(var)
           ...
           For each item in DBC do
           ...
           If var2="end" then
                Exit Sub
           End If
           Next
           ...
           End Sub
0
 

Expert Comment

by:shez
ID: 1855368
everything is easy once you know it.
and i'm also self-learned. :)
0
 

Author Comment

by:EasyQ
ID: 1855369
OK thanx again Shez. And hey, I'm sorry for spelling your name with an "A". Now go answer my other questions =] cya
0

Featured Post

Looking for a new Web Host?

Lunarpages' assortment of hosting products and solutions ensure a perfect fit for anyone looking to get their vision or products to market. Our award winning customer support and 30-day money back guarantee show the pride we take in being the industry's premier MSP.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

609 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