View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Clipboard.GetText

Charlie,

Set a reference to the MSForms 2.0 library, and use code like the
following:


Dim DObj As MSForms.DataObject
Dim S As String
Set DObj = New MSForms.DataObject
DObj.GetFromClipboard
S = DObj.GetText
Debug.Print S


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Charlie" wrote in message
...
In VB6 I can get the (text) contents of the system clipboard
within my app

Debug.Print Clipboard.GetText

I can't seem to do this in VBA. Is there a way to get the
clipboard text
into my procedures?

Thanks