Thread: Substr Copy
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Substr Copy

Do you actually need to get it into the clipboard?

If not

Range("B9").Value = Mid(Range("A1").Value,7,3)

if you need a string/text in the clipboard, see Chip Pearson's page on the
DataObject

http://www.cpearson.com/excel/clipboar.htm

--
Regards,
Tom Ogilvy

"DTHMTL" wrote in message
...
Can you copy a substr of text using VBA?

123456ABC7890

I know that I can use this to copy the entire cell
Range("A1").Copy

I want to copy "ABC" and that is it. I tried using "substr" combinations
both they don't seem to work.

Thanks