Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Determine if clipboard is empty
Using Office 2003 and Windows XP;
Is it possible using VBA to determine if there are any contents in the clipboard? If so, could someone please post a generic example of how to do this? Thanks much in advance. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Determine if clipboard is empty
For text data, try this:
Public Declare Function OpenClipboard Lib "user32" (ByVal hwnd As Long) As Long Public Declare Function CloseClipboard Lib "user32" () As Long Public Declare Function GetClipboardData Lib "user32" (ByVal uFormat As Long) As Long Public Function isClipboardEmpty() As Boolean OpenClipboard (0&) isClipboardEmpty = (GetClipboardData(1) = 0) CloseClipboard End Function On Nov 28, 1:28 pm, XP wrote: Using Office 2003 and Windows XP; Is it possible using VBA to determine if there are any contents in the clipboard? If so, could someone please post a generic example of how to do this? Thanks much in advance. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Determine if clipboard is empty
Just another option to test if the Clipboard is only holding an address
reference Function LinkingModeQ() As Boolean With Application LinkingModeQ = .CutCopyMode = xlCopy Or .CutCopyMode = xlCut End With End Function Sub Demo() Range("A1").Copy MsgBox LinkingModeQ '// Windows: Linking mode compromised, therefore turned off Application.CutCopyMode = False MsgBox LinkingModeQ End Sub -- HTH Dana DeLouis "XP" wrote in message ... Using Office 2003 and Windows XP; Is it possible using VBA to determine if there are any contents in the clipboard? If so, could someone please post a generic example of how to do this? Thanks much in advance. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Clipboard empty but still get waring that clipboard is full | Excel Discussion (Misc queries) | |||
Clipboard empty but get cannot empty CB when trying to copy | Excel Worksheet Functions | |||
Cannot empty the Clipboard | Excel Discussion (Misc queries) | |||
Cannot empty the clipboard | Excel Discussion (Misc queries) | |||
"Cannot empty Clipboard" | Excel Worksheet Functions |