VB count/wait/timeout script

Soldato
Joined
25 Jul 2006
Posts
3,529
Location
Taunton
im not sure which one i need, i just need a program to automatically do task after 30seconds, but im not sure which one i need, nor do i know the script for such a thing.

i have tried
Code:
wscript.sleep 30000
that didnt work

i also tried
Code:
' Add Timer1 to form
' .Interval=60000 (this can be set to 1000 to count seconds instead)
' .Enabled=False
'Add public variables
' Public CurrentMinute As Single
' Public TimeLimit As Single
'
' Activate timer to begin counting off minutes
'
Private Sub Timer1_Timer()
CurrentMinute=CurrentMinute+1
If CurrentMinute=TimeLimit Then
Timer1.Enabled=False
MsgBox "Time's Up": 'put code to execute other code, here
End If
End Sub
'
' Initialize variables
'
Private Sub Form_Load()
CurrentMinute = 0
TimeLimit=15
End Sub
and that didnt work.

please help!
 
well im only just starting to learn how to use the software so i dont know much about it, and yes im am using vb6, though i do believe my dad has bought 2005.

thanks again
 
posting in my Computing lesson :( quite boring, doing VB6 here as well tbh.

Whats so wrong with it? :o
 
Back
Top Bottom