Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default programming a macro to display the current time

Can someone tell me how to code a macro to display the current time is a
cell. I am able to get the date and time with using the Now coding, but can't
seem to get the only the hours and the minutes. I know this is an easy
fix...but help I'm a newbie
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default programming a macro to display the current time

MsgBox Time()
or
Sheet1.Range("A1").Value = Time()
--
HTH...

Jim Thomlinson


"sherobot" wrote:

Can someone tell me how to code a macro to display the current time is a
cell. I am able to get the date and time with using the Now coding, but can't
seem to get the only the hours and the minutes. I know this is an easy
fix...but help I'm a newbie

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default programming a macro to display the current time

I'm getting Expected value or varible when I put in this code. Do i need to
add something else? sorry for being so green at this.

"Jim Thomlinson" wrote:

MsgBox Time()
or
Sheet1.Range("A1").Value = Time()
--
HTH...

Jim Thomlinson


"sherobot" wrote:

Can someone tell me how to code a macro to display the current time is a
cell. I am able to get the date and time with using the Now coding, but can't
seem to get the only the hours and the minutes. I know this is an easy
fix...but help I'm a newbie

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Display Current Date & Time in a cell: Everytime I open the workbo sam Excel Worksheet Functions 4 September 3rd 09 11:30 PM
Display current sheet name being processed in macro Ann New Users to Excel 5 April 17th 07 01:18 PM
how do I display username, current time & date on the status bar Gary Tan Excel Programming 4 July 25th 06 06:29 AM
macro for current time mangesh Excel Discussion (Misc queries) 0 March 21st 06 08:22 PM
Help : Macro for capturing current system time imr Excel Programming 3 July 2nd 04 02:58 AM


All times are GMT +1. The time now is 08:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"