Hi all i have 2 forms. The second form is called when a command button in first form is cliced.
The problem is that when i click the button the second form pops up but the prograss bar does not run. i used form2.show inside my onclick event in my first form. I put the Timer1.Enabled = True inside onload event of second form but it never works!!I be happy if an expert tell me what is wrong here.Furthermore, i want the second form closes at the end of progress bar.Thanks
The problem is that when i click the button the second form pops up but the prograss bar does not run. i used form2.show inside my onclick event in my first form. I put the Timer1.Enabled = True inside onload event of second form but it never works!!I be happy if an expert tell me what is wrong here.Furthermore, i want the second form closes at the end of progress bar.Thanks
Code:
Option Explicit
Private Sub Form_Load()
[b]Timer1.Enabled = True[/b]
ProgressBar1.Max = 15
ProgressBar1.Value = 0
Timer1.Interval = 1000
Timer1.Enabled = False
End Sub
Private Sub Timer1_Timer()
If ProgressBar1.Value < ProgressBar1.Max Then
ProgressBar1.Value = ProgressBar1.Value + 1
Else
Timer1.Enabled = False
MsgBox "15 Seconds are up!"
End If
End Sub