Disferente
Programmer
Is there any way of making a command button look like it is pressed down without using the mouse or any key presses?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
[COLOR=blue]
Private Sub Check1_KeyDown(KeyCode As Integer, Shift As Integer)
If (KeyCode = vbKeyReturn) Then
Check1.Value = vbChecked
End If
End Sub
Private Sub Check1_KeyUp(KeyCode As Integer, Shift As Integer)
If (KeyCode = vbKeyReturn) Then
Check4.Value = vbUnchecked
End If
End Sub
[/color]
Private Sub Command1_Click()
Dim delay As Double
delay = Timer()
Me.cmdBtn.SpecialEffect = 3
Pause (0.5)
Me.cmdBtn.SpecialEffect = 1
End Sub
Sub Pause(ByVal nSecond As Single)
Dim t0 As Single
Dim dummy As Integer
t0 = Timer
Do While Timer - t0 < nSecond
dummy = DoEvents()
If Timer < t0 Then
t0 = t0 - 24 * 60 * 60 ' or t0 = t0 - 86400
End If
Loop
End Sub
[code]