Кнопка станет активной через 10 сек
В течение этих 10 сек Caption у нее должен быть вида ОК (10,9,..,0)
Dim i As Byte
Private Sub Form_Load()
Command1.Enabled = False
End Sub
Private Sub Timer1_Timer()
Command1.Caption = "ок (" & i & ")"
Debug.Print i
i = i + 1
If i > 10 Then
Command1.Enabled = True
Timer1.Enabled = False
Command1.Caption = "ок"
End If
End Sub
i=10
i=i-1
Dim i As Integer
Private Sub Form_Load()
Command1.Enabled = False
i = 10
End Sub
Private Sub Timer1_Timer()
Command1.Caption = "ок (" & i & ")"
Debug.Print i
i = i - 1
If i < 0 Then
Command1.Enabled = True
Timer1.Enabled = False
Command1.Caption = "ок"
End If
End Sub
Option Explicit
Private Sub Form_Load()
Command1.Enabled = False
End Sub
Private Sub Timer1_Timer()
Static i As Integer
Debug.Print i
i = i - 1
Command1.Caption = "OK (" & 10 + i & ")"
If i = -10 Then
Command1.Enabled = True
Timer1.Enabled = False
i=0
Command1.Caption = "OK"
End If
End Sub
Сейчас этот форум просматривают: SemrushBot и гости: 136