Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default insert current date

Hi,

I am trying to do what I suspect is a simple task and probably making a
meal out of it.

All I want to do is insert the current date into a cell, other than
having to type it.

I recorded a macro;

it has one line in it

ActiveCell.FormulaR1C1 = "=TODAY()"


unfortunately every time I use the macro the previous dates are set to
today's date. Not surprising really when the today() function is used.

I want to insert the date and then have it 'fixed'.

How can I do this please?

Thanks

--
Nospam
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 94
Default insert current date

Sub FixDate()
ActiveCell.Value = Date
End Sub

somethinglikeant


Nospam wrote:

Hi,

I am trying to do what I suspect is a simple task and probably making a
meal out of it.

All I want to do is insert the current date into a cell, other than
having to type it.

I recorded a macro;

it has one line in it

ActiveCell.FormulaR1C1 = "=TODAY()"


unfortunately every time I use the macro the previous dates are set to
today's date. Not surprising really when the today() function is used.

I want to insert the date and then have it 'fixed'.

How can I do this please?

Thanks

--
Nospam


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default insert current date

Hi Nospam

Ctrl ; insert the date

Or with code
ActiveCell.Value = Format(Date, "dd-mmm-yyyy")


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Nospam" wrote in message ...
Hi,

I am trying to do what I suspect is a simple task and probably making a meal out of it.

All I want to do is insert the current date into a cell, other than having to type it.

I recorded a macro;

it has one line in it

ActiveCell.FormulaR1C1 = "=TODAY()"


unfortunately every time I use the macro the previous dates are set to today's date. Not surprising really when the today()
function is used.

I want to insert the date and then have it 'fixed'.

How can I do this please?

Thanks

--
Nospam



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default insert current date

In message , Ron de Bruin
writes
Hi Nospam

Ctrl ; insert the date

Or with code
ActiveCell.Value = Format(Date, "dd-mmm-yyyy")



Thanks that did the trick


--
Nospam
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default insert current date

Thanks




In message .com,
somethinglikeant writes
Sub FixDate()
ActiveCell.Value = Date
End Sub

somethinglikeant


Nospam wrote:

Hi,

I am trying to do what I suspect is a simple task and probably making a
meal out of it.

All I want to do is insert the current date into a cell, other than
having to type it.

I recorded a macro;

it has one line in it

ActiveCell.FormulaR1C1 = "=TODAY()"


unfortunately every time I use the macro the previous dates are set to
today's date. Not surprising really when the today() function is used.

I want to insert the date and then have it 'fixed'.

How can I do this please?

Thanks

--
Nospam



--
Nospam
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
Insert Current Date on a Sheet 1 Tab Veronica Excel Worksheet Functions 6 February 13th 08 04:30 PM
Insert Current Date when cell is empty?? Dazed&confused! Excel Worksheet Functions 4 February 7th 07 09:18 AM
Any quick key to insert current Date and Time? Philip Excel Discussion (Misc queries) 2 January 12th 06 04:16 PM
how do I insert the current time (static) and date in a cell? DF Excel Discussion (Misc queries) 5 October 28th 05 05:54 PM
How to insert a current date Tarakesh Excel Discussion (Misc queries) 0 August 16th 05 05:31 AM


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