?
Solved

count down

Posted on 2003-03-31
3
Medium Priority
?
228 Views
Last Modified: 2010-05-01
hi

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

cheers!
0
Comment
Question by:FeVeR
[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 Comments
 
LVL 11

Accepted Solution

by:
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
    else
        CountDown = CountDown - 1
    end if
End Sub

' Good Luck!
0
 

Author Comment

by:FeVeR
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!
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month13 days, 22 hours left to enroll

801 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