Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default clearing the office clipboard in vba

Is there a way to clear the office clipboard in vba, I'm running XP and Excel
2003?
  #2   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default clearing the office clipboard in vba

hi,
applicaiton.cutcopymode = false

-----Original Message-----
Is there a way to clear the office clipboard in vba, I'm

running XP and Excel
2003?
.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default clearing the office clipboard in vba

There still are items in the clipboard after using applicaiton.cutcopymode =
false


If run application.displayclipboardwindow = true i can still see items in
the office clipboard

" wrote:

hi,
applicaiton.cutcopymode = false

-----Original Message-----
Is there a way to clear the office clipboard in vba, I'm

running XP and Excel
2003?
.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 117
Default clearing the office clipboard in vba

Hi, try this, its one of Chips.. l use it all the time..

Public Sub ClearClipboard()
Dim MyDataObj As New DataObject
MyDataObj.SetText ""
MyDataObj.PutInClipboard
End Sub

seeya ste
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default clearing the office clipboard in vba

When I try and run this code I receive a User-defined type not defined ERROR
how do I set MyDataObj in Excel2003

"ste mac" wrote:

Hi, try this, its one of Chips.. l use it all the time..

Public Sub ClearClipboard()
Dim MyDataObj As New DataObject
MyDataObj.SetText ""
MyDataObj.PutInClipboard
End Sub

seeya ste



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default clearing the office clipboard in vba

You need to have a reference to the msforms 2.0 library - the same one that
has the userform objects.

--
Regards,
Tom Ogilvy

"mtatlow" wrote in message
...
When I try and run this code I receive a User-defined type not defined

ERROR
how do I set MyDataObj in Excel2003

"ste mac" wrote:

Hi, try this, its one of Chips.. l use it all the time..

Public Sub ClearClipboard()
Dim MyDataObj As New DataObject
MyDataObj.SetText ""
MyDataObj.PutInClipboard
End Sub

seeya ste



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 117
Default clearing the office clipboard in vba

Hi, sorry l don't know (l have 2k) perhaps you could give Chip a shout
or visit his website...anyone else?

When I try and run this code I receive a User-defined type not defined ERROR
how do I set MyDataObj in Excel2003



Public Sub ClearClipboard()
Dim MyDataObj As New DataObject
MyDataObj.SetText ""
MyDataObj.PutInClipboard
End Sub

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 52
Default clearing the office clipboard in vba

Try this to see if you can find it:

Insert a new (temporary) userform into your workbook's project.

Then look at tools|references and see if you see something new checked.

Then remove the Userform.

mtatlow wrote:

When I try and run this code I receive a User-defined type not defined ERROR
how do I set MyDataObj in Excel2003

"ste mac" wrote:

Hi, try this, its one of Chips.. l use it all the time..

Public Sub ClearClipboard()
Dim MyDataObj As New DataObject
MyDataObj.SetText ""
MyDataObj.PutInClipboard
End Sub

seeya ste


--

Dave Peterson

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default clearing the office clipboard in vba

So I've got this compiling and running in Word under Office 2003, but it
doesn't clear the clipboard for me. I copy several items, show the clipboard,
see them. Then run this macro, and they remain there. Am I missing something?

Thanks!

"ste mac" wrote:

Hi, try this, its one of Chips.. l use it all the time..

Public Sub ClearClipboard()
Dim MyDataObj As New DataObject
MyDataObj.SetText ""
MyDataObj.PutInClipboard
End Sub

seeya ste

  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default clearing the office clipboard in vba

I'm also looking for such a procedure or method. I'm calling Excel from
Access and I notice that the suggested code clears the Excel clipboard but
not the contents of the clipboard from Access...If I check the clipboard from
Excel, it is in fact cleared, but if I switch to Access the clipboard there
still has the contents. I need to clear both. Anyone have a suggestion on how
to do that?

"gregschottland" wrote:

So I've got this compiling and running in Word under Office 2003, but it
doesn't clear the clipboard for me. I copy several items, show the clipboard,
see them. Then run this macro, and they remain there. Am I missing something?

Thanks!

"ste mac" wrote:

Hi, try this, its one of Chips.. l use it all the time..

Public Sub ClearClipboard()
Dim MyDataObj As New DataObject
MyDataObj.SetText ""
MyDataObj.PutInClipboard
End Sub

seeya ste



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
clearing the clipboard [email protected] Excel Discussion (Misc queries) 2 April 25th 07 09:11 AM
Clearing Clipboard Patrick[_7_] Excel Programming 1 September 28th 04 01:36 PM
clearing the clipboard mike Excel Programming 1 March 4th 04 08:34 PM
Clearing clipboard Charles Maxson Excel Programming 1 December 1st 03 02:46 PM
Clearing clipboard Gord Dibben Excel Programming 1 November 27th 03 11:37 AM


All times are GMT +1. The time now is 10:33 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"