ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Clearing the clipboard (https://www.excelbanter.com/excel-programming/345810-clearing-clipboard.html)

avi

Clearing the clipboard
 
Hello,

I'm looking for some API or othe method for clearing the clipboard in Excel
2003


Thanks,




Avi Benita 054-4660641 wwwAvi Benita 054-4660641 www.avibenita.com



Norman Jones

Clearing the clipboard
 
Hi Avi,

Try:

Application.CutCopyMode=False

---
Regards,
Norman



"Avi" wrote in message
...
Hello,

I'm looking for some API or othe method for clearing the clipboard in
Excel 2003


Thanks,




Avi Benita 054-4660641 wwwAvi Benita 054-4660641 www.avibenita.com




ste mac

Clearing the clipboard
 
Hi Avi, this is what I use, its one of Chips...works fine

ste

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


Chip Pearson

Clearing the clipboard
 
Application.CutCopyMode=False

This doesn't clear all the data in the clipboard, only Excel
data. Text will remain. To fully clear the clipboard, use

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

Sub AAA()
OpenClipboard 0&
EmptyClipboard
CloseClipboard
End Sub

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Norman Jones" wrote in message
...
Hi Avi,

Try:

Application.CutCopyMode=False

---
Regards,
Norman



"Avi" wrote in message
...
Hello,

I'm looking for some API or othe method for clearing the
clipboard in Excel 2003


Thanks,




Avi Benita 054-4660641 wwwAvi Benita 054-4660641
www.avibenita.com






Norman Jones

Clearing the clipboard
 
Hi Chip,

Thank you for the correction and elucidation.

---
Regards,
Norman



"Chip Pearson" wrote in message
...
Application.CutCopyMode=False


This doesn't clear all the data in the clipboard, only Excel data. Text
will remain. To fully clear the clipboard, use

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

Sub AAA()
OpenClipboard 0&
EmptyClipboard
CloseClipboard
End Sub

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Norman Jones" wrote in message
...
Hi Avi,

Try:

Application.CutCopyMode=False

---
Regards,
Norman



"Avi" wrote in message
...
Hello,

I'm looking for some API or othe method for clearing the clipboard in
Excel 2003


Thanks,




Avi Benita 054-4660641 wwwAvi Benita 054-4660641 www.avibenita.com









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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com