Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
jc jc is offline
external usenet poster
 
Posts: 18
Default Paste literal text

Is there a way to programatically paste literal text into
a cell. Example: I want create a macro to paste the
literal word 'Text' into a cell at the end of a column.
It seems simple but everything I read describes pasting
from the clipboard.

Thanks in advance
JC
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default Paste literal text

Paste from where?

Do you want to enter data into a cell?
Range("A1").Text = "MyContents"
or
Range("A1").Value = "MyContents"

If you are trying to turn a number into text then try:
Range(destination).Text = CStr(Range(source).value)
or
Range(destination).formula = "'" & CStr(range(source).value)

I am not sure of this last:
Range(destination).value = Range(Source).text

Stephen Rasey
Houston
http://wiserways.com
http://excelsig.org



"JC" wrote in message
...
Is there a way to programatically paste literal text into
a cell. Example: I want create a macro to paste the
literal word 'Text' into a cell at the end of a column.
It seems simple but everything I read describes pasting
from the clipboard.

Thanks in advance
JC



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Paste literal text

Dim rng as Range
set rng = Cells(rows.count,1).End(xlup)(2)
rng.Value = "Text"

you don't paste, just set the value.

--
Regards,
Tom Ogilvy


"JC" wrote in message
...
Is there a way to programatically paste literal text into
a cell. Example: I want create a macro to paste the
literal word 'Text' into a cell at the end of a column.
It seems simple but everything I read describes pasting
from the clipboard.

Thanks in advance
JC



  #4   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Paste literal text


-----Original Message-----
Is there a way to programatically paste literal text

into
a cell. Example: I want create a macro to paste the
literal word 'Text' into a cell at the end of a column.
It seems simple but everything I read describes pasting
from the clipboard.

Thanks in advance
JC
.


Thanks guys that's exactly what I needed.
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
Use CountIf for a literal string chadkwelch Excel Worksheet Functions 3 March 21st 10 03:45 AM
Number to words literal JCP Excel Worksheet Functions 12 August 22nd 08 05:18 PM
How to use literal quotes with concatenation schieb Excel Discussion (Misc queries) 2 February 3rd 06 09:49 PM
formula is displayed as literal text instead of formula result carlossaltz Excel Discussion (Misc queries) 2 July 1st 05 09:26 PM
Referencing Literal Arrays Vic Sowers Excel Worksheet Functions 2 May 24th 05 12:50 AM


All times are GMT +1. The time now is 03:05 PM.

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"