ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   disable message box during VBA code execution (https://www.excelbanter.com/excel-programming/350153-disable-message-box-during-vba-code-execution.html)

juergenkemeter[_9_]

disable message box during VBA code execution
 

Hi,
I have a VBA Function which copies and pastes Ranges automatically.
When executing the function, there are always message boxes like
"There is a large amount of information on the clipboard. Do you want
to be able to paste this information into another program later? To
save it to the clipboard, click Yes. To delete it and free memory,
click No"

I always want to click Yes, as otherwise my code wouldnt work.
Ho can I disable the displayment of these messages?

Cheers
Juergen


--
juergenkemeter
------------------------------------------------------------------------
juergenkemeter's Profile: http://www.excelforum.com/member.php...o&userid=25248
View this thread: http://www.excelforum.com/showthread...hreadid=500417


Dave Peterson

disable message box during VBA code execution
 
Application.cutcopymode = false

should clear the clipboard.

You could try:

application.displayalerts=false
'your code
application.displayalerts=true



juergenkemeter wrote:

Hi,
I have a VBA Function which copies and pastes Ranges automatically.
When executing the function, there are always message boxes like
"There is a large amount of information on the clipboard. Do you want
to be able to paste this information into another program later? To
save it to the clipboard, click Yes. To delete it and free memory,
click No"

I always want to click Yes, as otherwise my code wouldnt work.
Ho can I disable the displayment of these messages?

Cheers
Juergen

--
juergenkemeter
------------------------------------------------------------------------
juergenkemeter's Profile: http://www.excelforum.com/member.php...o&userid=25248
View this thread: http://www.excelforum.com/showthread...hreadid=500417


--

Dave Peterson

juergenkemeter[_10_]

disable message box during VBA code execution
 

works fine, thx!!
jk


--
juergenkemeter
------------------------------------------------------------------------
juergenkemeter's Profile: http://www.excelforum.com/member.php...o&userid=25248
View this thread: http://www.excelforum.com/showthread...hreadid=500417



All times are GMT +1. The time now is 05:08 PM.

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