Discussion:
Dear Dr Hangman! (about clipboard.clear)
(too old to reply)
Coshiz
2003-10-09 17:18:35 UTC
Permalink
Dear Dr Hangman !
This command (Clipboard.Clear) doesn' t work in VBA in Excel 2000.
(Run-time error '424' :Object required)
I have tasted it in my computer
Yours sincerely
***@poczta.onet.pl
Dr Hangman
2003-10-12 01:45:37 UTC
Permalink
This didn't make it when I sent it last time...

here it goes...

Dr Hangman
Sorry about that, I thought you were working with Visual Basic and not
Visual Basic for Applications
Since I do not have VBA, my advice is to try something like this...
Sub ClearClipboard()
Dim oDataObject As DataObject
Set oDataObject = New DataObject
oDataObject.SetText ""
oDataObject.PutInClipboard
Set oDataObject = Nothing
End Sub
This creates nothing and then puts it into the clipboard...
or something like this..
Private Declare Function EmptyClipboard Lib "user32" () As Long
to make sure you get the function..
From what I am aware of, VBA does support the clipboard, but the VBScript
does not...
http://support.microsoft.com/default.aspx?scid=kb;en-us;190273
So let me know if you have any trouble with those solutions...
Dr Hangman
----- Original Message -----
Newsgroups: alt.comp.lang.visualbasic.ver3
Sent: Thursday, October 09, 2003 12:18 PM
Subject: Dear Dr Hangman! (about clipboard.clear)
Post by Coshiz
Dear Dr Hangman !
This command (Clipboard.Clear) doesn' t work in VBA in Excel 2000.
(Run-time error '424' :Object required)
I have tasted it in my computer
Yours sincerely
Dear Dr Hangman !
This command (Clipboard.Clear) doesn' t work in VBA in Excel 2000.
(Run-time error '424' :Object required)
I have tasted it in my computer
Yours sincerely
Loading...