Chart Limit in a workbook?

sdohertyccb

Board Regular
Joined
Feb 15, 2005
Messages
91
I have a program that creates a dashboard for each saleman in the organization. I use the following code to MOVE the sheet then copy and paste the data. It works great until the 11th salesman, then it quits. The sheet I am copying has 12 charts, so after 10 copies the workbook has 120 charts. Is there a limit? Is there a workaround?
Code:
For x = 0 To offcr_cnt Step 1
    officer = Range("offcr_data").Offset(x, 0)
    Sheets("ln_templ").Activate
        Range("offcr_code") = officer
        ActiveSheet.Calculate
    Sheetcnt = ActiveWorkbook.Worksheets.Count
    Sheets("ln_templ").Copy After:=Sheets(Sheetcnt)
    ActiveSheet.name = officer
        Cells.Select
        Selection.Copy
        Range("A1").Select
        Selection.PasteSpecial Paste:=xlPasteValues 'errors out on this line after 11 interations
    ActiveSheet.Outline.ShowLevels RowLevels:=0, ColumnLevels:=1
    Application.CutCopyMode = False
    With ActiveWindow
        .DisplayGridlines = False
        .DisplayHeadings = False
        .DisplayOutline = False
    End With
Range("A1").Select
Next x
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Error Message:
RunTime error '-2147417848 (80010108)':

Automation error
The object invoked has disconnected from its clients.
This error occurs on the following code AFTER 3 or 4 iterations....

Rich (BB code):
    ActiveSheet.name = officer
        Cells.Select
        Selection.Copy
        Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues 'errors out on this line after 
 
Upvote 0

Forum statistics

Threads
1,216,084
Messages
6,128,724
Members
449,465
Latest member
TAKLAM

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