Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


count down

Posted on 2003-03-31
Medium Priority
Last Modified: 2010-05-01

how do i do a simple count down and how to i terminate my program?

Question by:FeVeR
LVL 11

Accepted Solution

supunr earned 80 total points
ID: 8243548
Option Explicit

Private CountDownVal as Long

Private Sub Form_Load()
   CountDownVal = 60
   timer1.Interval = 1000 ' each second
   timer1.Enabled = true
End Sub

Private Sub TImer1_timer()
    if (CountDown <= 0) then
        End ' end the program
        CountDown = CountDown - 1
    end if
End Sub

' Good Luck!

Author Comment

ID: 8243698
thanks to both!

the web sites were great, but this code is just copy and paste and has the end command which i needed too!

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month14 days, 20 hours left to enroll

577 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