The specified dimension is not valid for the current chart type

luxy007

New Member
Joined
Jul 25, 2017
Messages
3
Dear Excel Ninjas,

I am facing a challenge at work. I am getting the error in the subject line.

Kindly see my code below and please help. :)

Code:
Sub Loop_Macro()


Application.EnableEvents = False
Application.Calculation = xlCalculationManual
Application.EnableEvents = False


ActiveWindow.DisplayHeadings = False
ActiveWindow.DisplayHorizontalScrollBar = False
ActiveWindow.DisplayWorkbookTabs = False
Application.DisplayFormulaBar = False
Application.DisplayFullScreen = True


'Daily Sales
Do
Worksheets("Sales for the day").Activate


Application.Wait (Now + TimeValue("0:00:45"))


Sheets("Todays sales").Activate


Application.Wait (Now + TimeValue("0:00:45"))


Sheets("Projected volume").Activate


Application.Wait (Now + TimeValue("0:00:45"))


Sheets("Yesterdays sales").Activate


Application.Wait (Now + TimeValue("0:00:45"))




'Monthly sales
Worksheets("Sales for the month").Activate


Application.Wait (Now + TimeValue("0:00:45"))




Sheets("MTD Sales").Activate


Application.Wait (Now + TimeValue("0:00:45"))


Sheets("MTD Lite RB").Activate


Application.Wait (Now + TimeValue("0:00:45"))


Sheets("MTD Pie").Activate


Application.Wait (Now + TimeValue("0:00:45"))
Sheets("Lite comparison graph").Activate


Application.Wait (Now + TimeValue("0:00:45"))
Sheets("Volume split").Activate


Application.Wait (Now + TimeValue("0:00:45"))














Sheets("Gold graph").Activate


Application.Wait (Now + TimeValue("0:00:45"))


Sheets("Silver graph").Activate


Application.Wait (Now + TimeValue("0:00:45"))


Sheets("Summary graph").Activate


Application.Wait (Now + TimeValue("0:00:45"))






'Ytd Sales
Worksheets("Sales for the year").Activate


Application.Wait (Now + TimeValue("0:00:45"))


Sheets("YTD Pie").Activate


Application.Wait (Now + TimeValue("0:00:45"))


Sheets("YTD Sales").Activate


Application.Wait (Now + TimeValue("0:00:45"))


'Refresh code
ThisWorkbook.RefreshAll


Sheets("Sales for the day").Calculate
Sheets("Sales for the month").Calculate
Sheets("Sales for the year").Calculate
Sheets("Projected data").Calculate
Sheets("Gold customers").Calculate
Sheets("Silver Customers").Calculate
Sheets("Bronze").Calculate
Sheets("August target").Calculate
Sheets("Lite comparison data").Calculate
Sheets("YTD sales").Calculate








Loop


End Sub
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Do you get the error when manually switching between the sheets or refreshing the data? There is nothing obviously wrong with the code that I can see.

Also, please take a minute to read the forum rules, especially as regards cross-posting, and comply with them. Thanks. :)
 
Upvote 0
Do you get the error when manually switching between the sheets or refreshing the data? There is nothing obviously wrong with the code that I can see.

Also, please take a minute to read the forum rules, especially as regards cross-posting, and comply with them. Thanks. :)

My apologies for cross posting....

It happens after I refresh.

The name of the error I get is run-time error '2147352565 (80020000b)':
 
Upvote 0
Sounds like you have an issue with one of your charts rather than your code then.
 
Upvote 0

Forum statistics

Threads
1,223,895
Messages
6,175,257
Members
452,625
Latest member
saadat28

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