View Single Post
 
Old 10-14-2011, 10:10 AM
Catalin.B Catalin.B is offline Windows Vista Office 2010 32bit
Expert
 
Join Date: May 2011
Location: Iaşi, Romānia
Posts: 386
Catalin.B is on a distinguished road
Default

Try this code then... (you need to set a reference to the Microsoft Forms 2.0 Object Library... To add a reference to your VBA project, go to the Tools menu in the VBA editor and choose the References item. In the dialog that appears, scroll down the list until you find the appropriate library )
Code:
Sub paste()
Dim DataObj As New MSForms.DataObject
    Dim S, T As String
    DataObj.GetFromClipboard
    T = ActiveCell.Value
    
    S = DataObj.GetText
   
ActiveCell.Value = T & " " & S
End Sub
Reply With Quote