Hi all.
I copy a text which i put in clipboard in notepad in my VBA project. But
sometimes i see a runtime error (not all the time). I think this is because
there are other copied things in the clipboard before i copy. Is there a way
to clear the clipboard programatically ?
Eg.Code
Set Text = New DataObject
Text.SetText strStateText(String variable)
'Copies a text string to the DataObject using a specified format
objStateText.PutInClipboard
'Moves data from a DataObject to the Clipboard
intReturnValue = Shell("C:\xxx", 1)
'Shell(pathname[,windowstyle])
AppActivate intReturnValue
'Activates an application window
SendKeys "^V", True
SendKeys "^{HOME}", True
'Sends one or more keystrokes to the active window as if typed at the
keyboard.