Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default clearing the clipboard

Does anyone know of a macro that will clear the clipboard? I'm copying
stuff from the web into a spreadsheet and would like to use a macro
instead of the "clear all" button on the clipboard.

The following script doesn't seem to be working:

Application.CutCopyMode = False

Thanks!
Jason

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 747
Default clearing the clipboard

Try:

Declare Function EmptyClipboard Lib "user32" () As Long
Private Declare Function CloseClipboard Lib "user32" () As Long
Private Declare Function OpenClipboard Lib "user32" (ByVal hwnd As Long) As
Long

Sub ClearClip()
OpenClipboard 0&
EmptyClipboard
CloseClipboard
End Sub

" wrote:

Does anyone know of a macro that will clear the clipboard? I'm copying
stuff from the web into a spreadsheet and would like to use a macro
instead of the "clear all" button on the clipboard.

The following script doesn't seem to be working:

Application.CutCopyMode = False

Thanks!
Jason


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default clearing the clipboard

I ran the macro and nothing seems to happen. Can I just copy and paste
this code into a VBA module?

Thanks!
Jason



On Apr 23, 7:52 pm, Greg Wilson
wrote:
Try:

Declare Function EmptyClipboard Lib "user32" () As Long
Private Declare Function CloseClipboard Lib "user32" () As Long
Private Declare Function OpenClipboard Lib "user32" (ByVal hwnd As Long) As
Long

Sub ClearClip()
OpenClipboard 0&
EmptyClipboard
CloseClipboard
End Sub

" wrote:
Does anyone know of a macro that will clear the clipboard? I'm copying
stuff from the web into a spreadsheet and would like to use a macro
instead of the "clear all" button on the clipboard.


The following script doesn't seem to be working:


Application.CutCopyMode = False


Thanks!
Jason



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
clipboard clearing in excel, access, word... troy stud Excel Discussion (Misc queries) 0 October 27th 06 11:02 PM
clearing cells Lauren Excel Worksheet Functions 1 September 7th 06 09:41 PM
clearing a cell genevieveg Excel Discussion (Misc queries) 1 January 11th 06 01:26 AM
Clearing #N/A's in one go? Lee Harris Excel Worksheet Functions 5 November 22nd 05 06:52 PM
Clearing #VALUE skateblade Excel Worksheet Functions 3 October 15th 05 10:34 PM


All times are GMT +1. The time now is 11:24 PM.

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"