Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How can I stop current timers from firing again and terminate a sub

Posted on 2013-01-17
2
Medium Priority
?
214 Views
Last Modified: 2013-01-23
I have a timer that is fired every 100ms inside that timer I have different sub routine that are executed. If I hit a condition in which I would like to stop the timer and also exit the sub without re entering how could I do that?
0
Comment
Question by:cmdolcet
[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
2 Comments
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 38789537
Stop the timer and exit the sub, just like you said?

    Timer1.Stop()
    Exit Sub
0
 
LVL 2

Accepted Solution

by:
MMTadmin earned 900 total points
ID: 38789741
Every 100ms damn that's a lot of doing

Private Sub Timer

Timer.enabled = false
DoThis

End Sub

Private Sub DoThis

Debug.Print "Hello"
Timer.Enabled = True

End Sub
0

Featured Post

Technology Partners: 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!

Question has a verified solution.

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

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

660 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