Search Tools Links Login

count down to zero with a given number


Visual Basic 6, or VB Classic

this is very simple and is for begginners... it askes you to input a number... it will then loop messege box's until the number is counted down to zero.... then it replies with another messege box that says... "thats all"...... (updated code#2)

Original Author: Branden

Code

Private Sub Command1_Click()
Dim x As String
x = InputBox("enter a number u would like To count down from")
Do While x > 0
x = x - 1
If x = 0 Then
MsgBox "Thats all"
Else
MsgBox x
End If
Loop
End Sub

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 89 times

Categories

Visual Basic 6

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.