Forum Discussion
Lorenzo Kim
Jun 18, 2018Bronze Contributor
vba to suppress subtotal prompt
When I used DATA>subtotal to remove all , a prompt (see below) always appears, can I suppress it with vba to default as OK so that it will not show?
many thanks
- JKPieterseSilver ContributorI would suggest to solve the issue itself. Make sure the columns with your subtotalled data have one row with heading information. Each column must have a unique column name in one single cell. To force Excel to recognize it is a header, format the header differntly from the remaining rows, e.g. by setting the font to Bold.
- Lorenzo KimBronze ContributorMr Pieterse
Thank you for your suggestion.
many thanks- JKPieterseSilver ContributorDid the suggestion work?
- Lorenzo KimBronze Contributor
I found an article to suppress prompt by using:
Application.DisplayAlerts = False
then revert it to True afterwards.
This of course should only be done if all issues have been addressed.
thanks
- JKPieterseSilver ContributorI agree, this is a catch-all approach which is not the best way to address the above issue. It *is* useful in some other cases however.