LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default selection.copy - how to emulate Paste command?

Hi, this macro concatenates cell contents and displays them in Msgbox
and Debug window.
Now I would like to simply use the result string as a PASTE command.

Do you have any ideas?

Sub Concaten_Cells()
Text = ""
i = 0
ile = Selection.Cells.Count
For Each cell In Selection
i = i + 1
If Text < "" Then
Text = Text & ", " & cell.Text
Else
Text = cell.Text
End If
If i = ile Then
Text = Text & "."
End If
Next
MsgBox Text
Debug.Print Text
End Sub

Thanks, Tomek

 
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
selection.copy - how emulate Paste command? topola Excel Discussion (Misc queries) 1 January 7th 06 03:43 PM
copy and paste multiple selection Gareth[_3_] Excel Programming 7 May 29th 05 12:23 AM
I want to combine a "match" command with a copy and paste command. alomega Excel Programming 1 February 9th 05 05:52 PM
copy & paste command button RENEE RINEHART Excel Programming 4 April 9th 04 06:10 AM
Copy&Paste and Selection Change Bura Tino Excel Programming 3 November 22nd 03 01:35 AM


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