PC Review


Reply
Thread Tools Rate Thread

Adding text to an Activecell

 
 
=?Utf-8?B?dmVlcmFhbg==?=
Guest
Posts: n/a
 
      24th Oct 2007
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 With Quote
 
 
 
 
=?Utf-8?B?Q2FybG8=?=
Guest
Posts: n/a
 
      24th Oct 2007
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 With Quote
 
=?Utf-8?B?dmVlcmFhbg==?=
Guest
Posts: n/a
 
      26th Oct 2007
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Text Box Value From ActiveCell goss Microsoft Excel Programming 4 12th Nov 2008 03:30 AM
Still having issues with adding a period to a ActiveCell.Value Shaka215@gmail.com Microsoft Excel Programming 0 5th Jan 2007 07:48 PM
How do I insert Text Box in ActiveCell Borg Microsoft Excel Programming 2 15th Jul 2006 08:23 PM
If activecell is not text =?Utf-8?B?Sm9obg==?= Microsoft Excel Programming 1 27th Jan 2006 06:31 PM
ActiveCell.Text George Microsoft Excel Misc 2 3rd Oct 2003 05:05 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:53 AM.