Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
selection.copy - how to emulate Paste command?
I think you will have to write the variable "TEXT" to a cell first.
After that you can copy and paste the cell value value or simply continue to write "TEXT" to where it is required. N10 wrote in message oups.com... 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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
selection.copy - how to emulate Paste command?
Hi tpo
What do you meen with PASTE COMAND?? Regards yngve |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
selection.copy - how emulate Paste command? | Excel Discussion (Misc queries) | |||
copy and paste multiple selection | Excel Programming | |||
I want to combine a "match" command with a copy and paste command. | Excel Programming | |||
copy & paste command button | Excel Programming | |||
Copy&Paste and Selection Change | Excel Programming |