LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default How to add todays date (static) to the current active cell using m

Hello,

I have a worksheet that I'd like to apply the current date and time
(adjacent cells) in the next blank row auotmatically when the worksheet is
opened. i.e. if row 10 is blank on open, then A10 will have the date applied
and A11 the time. Both values must remain static.

I've started by trying to write a macro that will insert the current date
value into the active cell. See code below:

Dim james_stamp As Date
Dim james_range As Range
james_stamp = Now()
james_range = ActiveCell.Range
Range("james_range").Value = james_stamp

I'm having problems capturing the active cell and then using this value
within the 'Range' function. My next challenge was replacing the active cell
value with the 'next blank cell'. Then I'd need to run this macro on opening
the worksheet.

Can anyone push me in the right direction?

Many thanks,

JJ
 
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
Current date and time when different cell = X Workaholic Excel Worksheet Functions 3 August 13th 06 12:49 AM
link cell in excel to current date Romily Excel Discussion (Misc queries) 3 July 31st 06 01:42 PM
WHAT FUNCTION 2 ENTER SO THE CELL TURNS RED AFTER CURRENT DATE awilliams Excel Worksheet Functions 4 June 1st 06 09:40 PM
Addition to Turn cell red if today is greater or equal to date in cell Rich New Users to Excel 2 December 9th 04 02:06 AM
How do I program a cell to automaticinput the current date as dat. ces Excel Worksheet Functions 1 November 8th 04 11:11 PM


All times are GMT +1. The time now is 04:07 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"