SubTotals

M

MikeM

I have a Macro that takes current subtotal in a range and removes them.
However, the Macro Stop and gives me a Message Box telling me that "Entire
SubTotal will be deleted" Choice of OK or Cancel. How can I have it not ask
me this and just automatically run remove the SubTotal?
The line simple reads as follows:

Selection.RemoveSubtotal
Range("F8:AA321").Select
 
J

Jarek Kujawa

try

Application.DisplayAlerts = False
Selection.RemoveSubtotal
Range("F8:AA321").Select
 
R

ryguy7272

Just under the start of the Sub:
Application.DisplayAlerts = False

Just before the end of the Sub
Application.DisplayAlerts = True

Regards,
Ryan---
 

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