richarddawson
Board Regular
- Joined
- Oct 18, 2014
- Messages
- 95
I want to avoid Copy and Paste, but I have to pick up a string from a third-party website. I am trying to do this by taking a value directly off the clipboard, using this procedure.
Public tfrString As String
Public dataObj As New MSForms.DataObject
Function clipIt()
Dim jString As String
dataObj.GetFromClipboard
tfrString = dataObj.GetText
End Function
This works fine as a standalone, but when I try to use it elsewhere –
Call clipIt
And then use tfrString
I get an error message
“DataObject: GetText OpenClipBoard Failed”.
Can anyone suggest why, please?
Public tfrString As String
Public dataObj As New MSForms.DataObject
Function clipIt()
Dim jString As String
dataObj.GetFromClipboard
tfrString = dataObj.GetText
End Function
This works fine as a standalone, but when I try to use it elsewhere –
Call clipIt
And then use tfrString
I get an error message
“DataObject: GetText OpenClipBoard Failed”.
Can anyone suggest why, please?