Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Easy-Selecting "No" from message box
Witin my code, I am opening a workbook and copying a selection of data. I do not make any modifications to the workbook, and subsequently close the file. Does anyone have the code that will allow me to select the "No" option of the message box that opens when closing that asks if you would like to store information on the clipboard? thanks -- tobriant ------------------------------------------------------------------------ tobriant's Profile: http://www.excelforum.com/member.php...o&userid=25155 View this thread: http://www.excelforum.com/showthread...hreadid=480867 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Selecting "Save As" adds "Copy of" to file name- MS Excel 2007 | Excel Discussion (Misc queries) | |||
"excel "macros may be disabled" message using an xlam file | Excel Worksheet Functions | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
How do I find ""Easy Sum" Not Auto Sum | Excel Discussion (Misc queries) | |||
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next | New Users to Excel |