ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Eliminating Excel msgbox from popping up while macro is running. (https://www.excelbanter.com/excel-programming/283382-eliminating-excel-msgbox-popping-up-while-macro-running.html)

dpdutke

Eliminating Excel msgbox from popping up while macro is running.
 
I would like to keep the following msgbox from popping up
whenever my macro merges like cells using the "Format
Cells", "Alignment", "Merge cells" property commands:

"The selection contains multiple data values. Merge into
one cell will keep the upper-left most data only."

Thanks!

dpdutke

Paul B[_6_]

Eliminating Excel msgbox from popping up while macro is running.
 
give this a try,
Application.DisplayAlerts = False
'Your Code
Application.DisplayAlerts = True


--
Paul B
Always backup your data before trying something new
Using Excel 2000 & 97
Please post any response to the newsgroups so others can benefit from it
** remove news from my email address to reply by email **
"dpdutke" wrote in message
...
I would like to keep the following msgbox from popping up
whenever my macro merges like cells using the "Format
Cells", "Alignment", "Merge cells" property commands:

"The selection contains multiple data values. Merge into
one cell will keep the upper-left most data only."

Thanks!

dpdutke




Haldun Alay[_3_]

Eliminating Excel msgbox from popping up while macro is running.
 
Hi,

set Application.DisplayAlerts to False before merging the cells and set it back to True.

In your example;

Application.DisplayAlerts=False
Range("A1:A5").merge True
application.DisplayAlerts=True

--
Regards

Haldun Alay

To e-mail me, please remove AT and DOT from my e-mail address.



"dpdutke" , iletide sunu yazdi ...
I would like to keep the following msgbox from popping up
whenever my macro merges like cells using the "Format
Cells", "Alignment", "Merge cells" property commands:

"The selection contains multiple data values. Merge into
one cell will keep the upper-left most data only."

Thanks!

dpdutke


All times are GMT +1. The time now is 07:46 AM.

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