+ Reply to Thread
Results 1 to 1 of 1

How to use the wait function to create a program that tells time every hour on the hour

Hybrid View

PANTECH How to use the wait function... 03-07-2014, 11:26 AM
  1. #1
    Registered User
    Join Date
    04-03-2013
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    78

    How to use the wait function to create a program that tells time every hour on the hour

    I wanted to see if it was possible to have my computer tell me the time every hour on the hour and show a message. The below code does not work. If this is possible does the application always have to be open in order for it to work?

    Public Sub TalkingTime()
    For i = 0 To 9
        Application.Wait (Now + TimeValue("1:00:00"))
        Application.Speech.Speak ("The Time is" + Time)
        Next i
    End Sub
    
    Sub GetAnswer()
        Dim Ans As Integer
        Ans = MsgBox("Do you know what time it is?", vbYesNo)
        Select Case Ans
            Case vbYes
    '       ...[code if Ans is Yes]...
    '       ...[code if Ans is No]...
        End Select
        
    End Sub
    Attached Files Attached Files
    Last edited by PANTECH; 03-07-2014 at 02:28 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. VBA to convert 12 hour to 24 hour time
    By Krrattner in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-29-2012, 06:59 PM
  2. Default time from 12 hour clock to 24 hour clock
    By MR-77 in forum Excel General
    Replies: 3
    Last Post: 03-31-2011, 04:15 PM
  3. Convert 12 hour to 24 hour time
    By RussellNonBrand in forum Excel General
    Replies: 5
    Last Post: 01-26-2011, 03:01 PM
  4. Formula to create roster, hours worked in 24 hour time with breaks
    By nixxiola in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-05-2010, 12:00 PM
  5. convert decimal numbers to a fraction of an hour for payroll hour
    By Flower in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-10-2006, 03:50 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1