I am trying to paste directly from the clipboard into an excel document and have it so it is transposed
Dim DataObj As MSForms.DataObject
Set DataObj = New
I think you need to specify target where to paste and on it call PasteSpecial method
. You cant call pasteSpecial
method of string as you trying. (because of that error with object required)
Take a look at this
Sub testPaste()
Dim DataObj As MSForms.DataObject
Set DataObj = New MSForms.DataObject
DataObj.GetFromClipboard
strPaste = DataObj.GetText(1)
Sheets("Sheet2").Rows(1).PasteSpecial Transpose:=True
End Sub