View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Leith Ross[_181_] Leith Ross[_181_] is offline
external usenet poster
 
Posts: 1
Default Easy-Selecting "No" from message box


Hello Tobriant,

Copy and paste this macro into a VBA project module.

CALLING THE MACRO:
ClearClipboard


Code:
--------------------
Declare Function OpenClipboard _
Lib "User32.dll" _
(ByVal hWndNewOwner As Long) As Long

Declare Function EmptyClipboard _
Lib "User32.dll" () As Long

Declare Function CloseClipboard _
Lib "User32.dll" () As Long

Public Sub ClearClipboard()

Dim Ret

Ret = OpenClipboard(0&)
If Ret < 0 Then
Ret = EmptyClipboard
End If
CloseClipboard

End Sub

--------------------

Sincerely,
Leith Ross


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=480867