Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automation Error: Object has disconnected from its client message:

Status
Not open for further replies.

Phrazel

Technical User
Sep 30, 2015
4
US
Hello -
I have created a basic copy and paste macro that was working fine, but when I went to expand the amount of sheets I started receiving an Automation Error: Object has disconnected from its client message:
I run this code over about 30 times with "Daffy, Duck" the only thing changing, almost at the end I get the error.
Any help is greatly appreciated.

Here is the code:
Code:
Sub Duck()
'
'

    Application.CutCopyMode = False
    Application.ScreenUpdating = False
    Sheets("Pivot Data Sheet").Select
    
    ActiveSheet.Range("$A$1:$BD$184").AutoFilter Field:=12, Criteria1:="Fail"
    ActiveSheet.Range("$A$1:$BD$184").AutoFilter Field:=16, Criteria1:="Daffy, Duck"
    
    ActiveSheet.Range("A2:BD50000").Copy Destination:=Sheets("Daffy, Duck").Range("A2")
    
    ManagerSortedData = Empty
    Application.CutCopyMode = False
    Sheets("Pivot Data Sheet").Select
    ActiveSheet.ShowAllData
    

End Sub
 
You may get the answer here, but since this is a VBA question, you would be better off to ask your question here at forum707

Have fun.

---- Andy

A bus station is where a bus stops. A train station is where a train stops. On my desk, I have a work station.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top