Hi All,
I am trying to make a command button count down and show the numbers as its counting down.
I can make it show a starting number and its final number but not the numbers in between.
Here is the code at present
Also when it gets to 1 then automatically presses CommandButton1.![]()
Private Sub CommandButton8_Click() Dim i As Integer If Date <= CDate("06/04/" & Year(Date)) Then Me.TextBox2.Value = "06/04/" & Year(Date) - 1 Me.TextBox3.Value = "05/04/" & Year(Date) Me.CommandButton1.Caption = "> > > Apply Dates < < <" Me.Controls("CommandButton1").BackColor = &H8080FF Else Me.TextBox2.Value = "06/04/" & Year(Date) Me.TextBox3.Value = "05/04/" & Year(Date) + 1 Me.CommandButton1.Caption = "> > > Apply Dates < < <" Me.Controls("CommandButton1").BackColor = &H8080FF For i = 5 To 1 Step -1 Me.CommandButton1.Caption = "> > > " & i & " < < <" Application.Wait Now + TimeSerial(0, 0, 1) Next i End If End Sub
Any help is much appreciated.











LinkBack URL
About LinkBacks
Register To Reply
Bookmarks