Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Adding text to an Activecell

Hi there....Need help!!

I am writing some code whereby once I know which cell is the current
ActiveCell, I have to add a timestamp value to the cell which I am getting as
follows.

Application.ActiveCell.Value = Format(Date)

Now my trouble is that this statement is overwriting the existing
information in the cell. I want my code to add timestamp either at the top or
bottom of existing text in the cell without it deleting any current
contents...

So if A6 = "Hello World" before.....

I want it to look like this after code...

A6= 25/10/2007 "Hello World" or "Hello World " 25/10/2007

Hope you can help...Let me know if you need more information...

Regards
Veeraan


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 179
Default Adding text to an Activecell

what about

ActiveCell.Value = activecell.value & " " & Format(Date)

(application is not needed!)

hth Carlo

"veeraan" wrote:

Hi there....Need help!!

I am writing some code whereby once I know which cell is the current
ActiveCell, I have to add a timestamp value to the cell which I am getting as
follows.

Application.ActiveCell.Value = Format(Date)

Now my trouble is that this statement is overwriting the existing
information in the cell. I want my code to add timestamp either at the top or
bottom of existing text in the cell without it deleting any current
contents...

So if A6 = "Hello World" before.....

I want it to look like this after code...

A6= 25/10/2007 "Hello World" or "Hello World " 25/10/2007

Hope you can help...Let me know if you need more information...

Regards
Veeraan


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Adding text to an Activecell

Thanks Carlo...that helps

"Carlo" wrote:

what about

ActiveCell.Value = activecell.value & " " & Format(Date)

(application is not needed!)

hth Carlo

"veeraan" wrote:

Hi there....Need help!!

I am writing some code whereby once I know which cell is the current
ActiveCell, I have to add a timestamp value to the cell which I am getting as
follows.

Application.ActiveCell.Value = Format(Date)

Now my trouble is that this statement is overwriting the existing
information in the cell. I want my code to add timestamp either at the top or
bottom of existing text in the cell without it deleting any current
contents...

So if A6 = "Hello World" before.....

I want it to look like this after code...

A6= 25/10/2007 "Hello World" or "Hello World " 25/10/2007

Hope you can help...Let me know if you need more information...

Regards
Veeraan


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
Echo Contents of ActiveCell into a Text box. ChrisR Excel Discussion (Misc queries) 2 September 17th 09 04:00 PM
If activecell.column = variable then activecell,offset (0,1) Battykoda via OfficeKB.com Excel Discussion (Misc queries) 1 October 2nd 07 08:05 PM
Still having issues with adding a period to a ActiveCell.Value [email protected] Excel Programming 0 January 5th 07 07:48 PM
How do I insert Text Box in ActiveCell Borg Excel Programming 2 July 15th 06 08:23 PM
If activecell is not text John Excel Programming 1 January 27th 06 06:31 PM


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