![]() |
|
#5
|
|||
|
|||
|
.
Downloads at bottom ... Timer code : Code:
Option Explicit
Sub BtnRaz_Click()
mTimer3.TimerOff
LblTemps.Caption = "00:00:10"
With TButton1
.Caption = "Start"
.ForeColor = &H8000&
.Value = False
End With
End Sub
Sub TimerStart()
With TButton1
If .Value = True Then
.Caption = "Stop"
.ForeColor = &H80&
mTimer3.TimerOn 1000
Else
.Caption = "Start"
.ForeColor = &H8000&
mTimer3.TimerOff
End If
End With
End Sub
Private Sub TButton1_Click()
TimerStart
End Sub
Private Sub UserForm_Initialize()
Application.WindowState = xlMinimized
With TButton1
.Caption = "Start"
.ForeColor = &H8000&
.Value = False
End With
Const C_VBA6_USERFORM_CLASSNAME = "ThunderDFrame"
Dim ret As Long
Dim formHWnd As Long
'Get window handle of the userform
formHWnd = FindWindow(C_VBA6_USERFORM_CLASSNAME, Me.Caption)
If formHWnd = 0 Then
Debug.Print Err.LastDllError
End If
'Set userform window to 'always on top'
ret = SetWindowPos(formHWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE)
If ret = 0 Then
Debug.Print Err.LastDllError
End If
End Sub
Private Sub UserForm_Terminate()
Application.WindowState = xlNormal
mTimer3.TimerOff
Unload Me
End Sub
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| #REF Error when calling VBA Function | RodneyJ | Excel Programming | 1 | 01-21-2016 12:42 PM |
| Re-Calling Sent Email | freschij | Outlook | 1 | 12-06-2010 09:16 PM |
| calling images with a button | sammer021486 | PowerPoint | 0 | 01-13-2010 08:24 AM |
first timer
|
papamadre | Forum Support | 1 | 10-24-2009 06:26 AM |
| Bingo Cards | office_mike | Excel | 1 | 11-29-2008 10:17 PM |