How to suppress Excel warning "Complex formatting" in VBA?

Robrt

New Member
Joined
Feb 23, 2016
Messages
2
Hi everyone,

I have a VBA code which creates (and formats) a scatter chart from 7 columns and 3000 lines of data. Every time when the chart is created I get a warning box: "Complex formatting that is applied to the selected chart may take a while to display. Do you want to continue to use the formatting?" and I need to click "Yes" to confirm. I don't like this!

I searched this forum and the only possible solution I found was to use "Application.DisplayAlerts = False". This seems to work for all other warnings (like worksheet deleted, etc.), but not for the complex chart formatting. I have placed the "Application.DisplayAlerts = False" on the very beginning of my code and "Application.DisplayAlerts = True" on the very end.

Can anyone advise what needs to be done to suppress the "Complex formatting" warning in Excel?

Many thanks in advance!
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Hi everyone,

I have a VBA code which creates (and formats) a scatter chart from 7 columns and 3000 lines of data. Every time when the chart is created I get a warning box: "Complex formatting that is applied to the selected chart may take a while to display. Do you want to continue to use the formatting?" and I need to click "Yes" to confirm. I don't like this!

I searched this forum and the only possible solution I found was to use "Application.DisplayAlerts = False". This seems to work for all other warnings (like worksheet deleted, etc.), but not for the complex chart formatting. I have placed the "Application.DisplayAlerts = False" on the very beginning of my code and "Application.DisplayAlerts = True" on the very end.

Can anyone advise what needs to be done to suppress the "Complex formatting" warning in Excel?

Many thanks in advance!

never tried this, but my research on your issues shows this as a possible solution:

Code:
Application.SendKeys "{ENTER}"

my understanding is that you would enter that into your code where the warning is firing.

Link to solution:

Supress "Complex formatting that is applied to the selected chart..." message?
 
Upvote 0
never tried this, but my research on your issues shows this as a possible solution:

Code:
Application.SendKeys "{ENTER}"

my understanding is that you would enter that into your code where the warning is firing.

Link to solution:

Supress "Complex formatting that is applied to the selected chart..." message?


Many thanks for your quick reply!

Your solution works and I no longer have to press ENTER (or click OK), however it has an interesting side effect. Every time this code is executed - NumLock on my keyboard is switched off. Although this is somehow less annoying than the need to press ENTER, it would be also nice to avoid.
 
Upvote 0

Forum statistics

Threads
1,213,551
Messages
6,114,268
Members
448,558
Latest member
aivin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top