How can I refere to a already copied excel range? The code should not copy the range, but only paste. My test looks something like
Sub PasteBack()
Dim DataObj As New MSForms.DataObject
Dim S As String
DataObj.GetFromClipboard
dataToCopy = DataObj.GetText
n = 1
For i = 2 To Cells(Rows.Count, 1).End(xlUp).Row
If Not Rows(i).Hidden Then
dataToCopy.Offset(n - 1).Resize(1).Copy Cells(i, 1)
n = n + 1
If n > dataToCopy.Rows.Count Then Exit Sub
End If
Next
End Sub
but the GetText refers to text that the copied excel range is not. What to do? Thank you for your help.
Bookmarks