Eliminating Excel msgbox from popping up while macro is running.

D

dpdutke

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
 
P

Paul B

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 **
 
H

Haldun Alay

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" <[email protected]>, 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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top