Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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

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
Selecting "Save As" adds "Copy of" to file name- MS Excel 2007 ronhansen Excel Discussion (Misc queries) 1 November 15th 09 09:33 PM
"excel "macros may be disabled" message using an xlam file frustrated Excel Worksheet Functions 2 July 13th 09 08:32 PM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
How do I find ""Easy Sum" Not Auto Sum Damar Excel Discussion (Misc queries) 1 January 15th 07 12:19 PM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM


All times are GMT +1. The time now is 10:44 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"