View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
NickHK NickHK is offline
external usenet poster
 
Posts: 4,391
Default Long shot? Copy rows but have XL2K insert a space between each row??

If the paste is outside of Excel, then use the DataObject; requires
reference to Forms2. Something like:

Private Sub CommandButton2_Click()
Dim DatObj As DataObject

Const FORMAT_TEXT As Long = 1

Set DatObj = New DataObject

Selection.Copy

With DatObj
.GetFromClipboard
If .GetFormat(FORMAT_TEXT) = True Then
.SetText Replace(.GetText(FORMAT_TEXT), vbNewLine, vbNewLine &
vbNewLine)
.PutInClipboard
End If

End With

End Sub

NickHK

"StargateFanFromWork" wrote in message
...
If I have this type of thing in a workbook:

Information in row A
Information in row B
Information in row C
Information in row D




Is there a way to have Excel add an extra line to what we copy to the
clipboard so that when we paste the data, we get this instead of the

above?:

Information in row A

Information in row B

Information in row C

Information in row D


It feels like a longshot but so many times I've been surprised at what

Excel
can do by what you've all shown me in this group, that I'm putting the
message out there anyway.

Thanks much! :oD