Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 09-15-2018, 05:25 PM
Logit Logit is offline 10 Second Timer for Calling Bingo Windows 10 10 Second Timer for Calling Bingo Office 2007
Expert
 
Join Date: Jan 2017
Posts: 591
Logit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the rough
Default

.

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


Attached Images
File Type: jpg Timer.jpg (132.0 KB, 28 views)
Attached Files
File Type: xlsm EXCEL BINGO PROGRAM Sep 5 20181.xlsm (26.0 KB, 11 views)
File Type: xlsm Ten Sec Countdown In Form.xlsm (26.6 KB, 14 views)
Reply With Quote
 



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
10 Second Timer for Calling Bingo first timer papamadre Forum Support 1 10-24-2009 06:26 AM
Bingo Cards office_mike Excel 1 11-29-2008 10:17 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:13 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft