+ Reply to Thread
Results 1 to 7 of 7

How to write a macro to get the system time in excel 97

  1. #1
    Raj
    Guest

    How to write a macro to get the system time in excel 97



  2. #2
    Dave Peterson
    Guest

    Re: How to write a macro to get the system time in excel 97

    Option Explicit
    Sub testme()

    MsgBox Now
    MsgBox Date
    MsgBox Format(Now, "hh:mm:ss")

    End Sub


    Raj wrote:

    --

    Dave Peterson

  3. #3
    Mexage
    Guest

    RE: How to write a macro to get the system time in excel 97

    You can also use the formulas directly into the cell:

    =Date()
    for Just the date

    =Now()
    for Date and time

    and

    =Now()-Date()
    for just the time
    "Raj" wrote:

    >


  4. #4
    Don Guillett
    Guest

    Re: How to write a macro to get the system time in excel 97

    From now on - Do NOT put your question in the subject line. Put a meaningful
    subject line such as "sytem time" and ask your question in the BODY of the
    message.

    Sub gettime()
    MsgBox Time
    End Sub

    --
    Don Guillett
    SalesAid Software
    [email protected]
    "Raj" <[email protected]> wrote in message
    news:[email protected]...
    >




  5. #5
    Mexage
    Guest

    Re: How to write a macro to get the system time in excel 97

    I suggest that we act politely, and instead of giving orders we orientate
    people.

    :-) Have a nice day!

    "Don Guillett" wrote:

    > From now on - Do NOT put your question in the subject line. Put a meaningful
    > subject line such as "sytem time" and ask your question in the BODY of the
    > message.
    >
    > Sub gettime()
    > MsgBox Time
    > End Sub
    >
    > --
    > Don Guillett
    > SalesAid Software
    > [email protected]
    > "Raj" <[email protected]> wrote in message
    > news:[email protected]...
    > >

    >
    >
    >


  6. #6
    Don Guillett
    Guest

    Re: How to write a macro to get the system time in excel 97

    We have been doing that in MANY posts and yet the problem persists. Those
    that insist will probably not get much in the way of answers.

    --
    Don Guillett
    SalesAid Software
    [email protected]
    "Mexage" <[email protected]> wrote in message
    news:[email protected]...
    > I suggest that we act politely, and instead of giving orders we orientate
    > people.
    >
    > :-) Have a nice day!
    >
    > "Don Guillett" wrote:
    >
    > > From now on - Do NOT put your question in the subject line. Put a

    meaningful
    > > subject line such as "sytem time" and ask your question in the BODY of

    the
    > > message.
    > >
    > > Sub gettime()
    > > MsgBox Time
    > > End Sub
    > >
    > > --
    > > Don Guillett
    > > SalesAid Software
    > > [email protected]
    > > "Raj" <[email protected]> wrote in message
    > > news:[email protected]...
    > > >

    > >
    > >
    > >




  7. #7
    David McRitchie
    Guest

    Re: How to write a macro to get the system time in excel 97

    Depends on what you are looking for as the system time.
    VBA time functions Now, Time include truncated seconds.
    The VBA timer function about the same though it differs on PC and MAC
    PC version really only attempts to show seconds. (on a PC it show .0 or .5 seconds).

    The Excel NOW Worksheet Function is accurate to 10ms.

    For a comparison of the Date and Time worksheet functions to the
    VBA functions (I am using Excel 2000) see
    http://www.mvps.org/dmcritchie/excel...htm#comparison

    If you are interested in timing something see
    http://www.mvps.org/dmcritchie/excel/slowresp.htm#timer
    based on
    "How To Use QueryPerformanceCounter to Time Code"
    http://support.microsoft.com/kb/172338/EN-US/

    ---
    HTH,
    David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
    My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
    Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

    "Raj" <[email protected]> wrote .
    (question was missing as already mentioned)



+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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