#1   Report Post  
m.j.anderson
 
Posts: n/a
Default Date and Time Macro

I would like to create a macro (or add a button to the toolbar) that will
insert todays date and time into a selected cell. (word does this nicely and
gives the option to automatically update or to remain static- - I need static
dates with an easy way for multiple users to insert them ) The =TODAY
function will insert the date but not the time and the =NOW function updates
all cells with "now" dates to the most recently inserted. The date and time
will be used to track info in adjacent cells. The date needs to remain static
so that users can see dates and times that the info was added.
new to macros/ keep it simple
THANKS!
  #2   Report Post  
Andy Brown
 
Posts: n/a
Default

Start recording a macro. In the "Record Macro" dialog, change the macro name
to "Date_Time" (without the quotes), make the shortcut key CTRL+T (capital
T), make sure it's stored in This Workbook, click OK.

Stop Recording.

Press ALT+F8, highlight Date_Time in the listbox, click Edit. Replace
everything between the "Sub" and "End Sub" lines with

ActiveCell.Value = Now

Press ALT+Q to quit the VBE. Back in the worksheet, use the CTRL(+Shift)+T
shortcut to call it.

HTH,
Andy


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
Timeline with critical date markers KM01 Charts and Charting in Excel 2 January 20th 05 09:25 AM
Help with graphing log data Petrov27 Charts and Charting in Excel 2 January 19th 05 09:17 PM
How to exclude weekends/holidays from plotted time series Debbie424242 Charts and Charting in Excel 3 January 19th 05 07:00 PM
Line chart - date line association gone mad! Johannes Czernin Charts and Charting in Excel 5 January 17th 05 08:48 PM
Auto date changing in Excel is maddening brhicks Charts and Charting in Excel 3 December 16th 04 02:54 PM


All times are GMT +1. The time now is 10:40 AM.

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

About Us

"It's about Microsoft Excel"