Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default The object invoked has disconnected from its clinets

Hi,

I am copying sheets in a macro...
Copy a sheet, rename the copy, copy the sheet again, and
rename the copy again...

Usually on the third copy,I get the following error
message:

Run-time error '-2147417848 (80010108)':
Automation error
The object invoked has disconnected from its clients

If I then try to do a manual copy, Excel crashes and sends
a Dump to Microsoft.

If I start again and do the copies manually, then on the
third time, Excel crashes and sends a Dump to Microsoft.

I was thinking I was running out of resources, so I
deleted a large number of sheets and reduced the size of
the workbook by 60%, but the problem still occurs evrery
time.


Any ideas gratefuly received.

Don
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default The object invoked has disconnected from its clinets

If you create a new test version of your workbook (with just a little data in
each sheet so the macro can run), does it work ok?

I had one workbook that had one worksheet that was corrupted. I couldn't copy
it to another workbook via code or manually.

Interestingly, I could move the sheet without the crash. But that scared me.
(How long before Move wouldn't work.) So I did a little testing to make sure my
code wasn't the problem. When I was convinced that it wasn't the code, I
recreated that problem worksheet and it's been fine ever since.


Don wrote:

Hi,

I am copying sheets in a macro...
Copy a sheet, rename the copy, copy the sheet again, and
rename the copy again...

Usually on the third copy,I get the following error
message:

Run-time error '-2147417848 (80010108)':
Automation error
The object invoked has disconnected from its clients

If I then try to do a manual copy, Excel crashes and sends
a Dump to Microsoft.

If I start again and do the copies manually, then on the
third time, Excel crashes and sends a Dump to Microsoft.

I was thinking I was running out of resources, so I
deleted a large number of sheets and reduced the size of
the workbook by 60%, but the problem still occurs evrery
time.

Any ideas gratefuly received.

Don


--

Dave Peterson

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default The object invoked has disconnected from its clinets

Just curious if you tried your theory against a fresh workbook?

This worked ok for me:

Option Explicit
Sub testme01()

Dim newWks As Worksheet
Dim myPict As Picture
Dim iCtr As Long

Set newWks = Worksheets.Add

With newWks
Set myPict = .Pictures.Insert("C:\MyPicture.gif")
End With

With myPict
.OnAction = ThisWorkbook.Name & "!hithere"
End With

For iCtr = 1 To 100
newWks.Copy _
befo=newWks
Next iCtr

End Sub

Sub hithere()
MsgBox "hi there from " & Application.Caller
End Sub


Don wrote:

I have found that the presence of any Picture in the
workbook, with any Macro Assigned to the picture causes
this problem without fail.

I delete the Mactro Assigned Picture, leaving many other
pictures, and the third copy works fine.

Micros**t strikes again!


-----Original Message-----
If you create a new test version of your workbook (with

just a little data in
each sheet so the macro can run), does it work ok?

I had one workbook that had one worksheet that was

corrupted. I couldn't copy
it to another workbook via code or manually.

Interestingly, I could move the sheet without the crash.

But that scared me.
(How long before Move wouldn't work.) So I did a little

testing to make sure my
code wasn't the problem. When I was convinced that it

wasn't the code, I
recreated that problem worksheet and it's been fine ever

since.


Don wrote:

Hi,

I am copying sheets in a macro...
Copy a sheet, rename the copy, copy the sheet again, and
rename the copy again...

Usually on the third copy,I get the following error
message:

Run-time error '-2147417848 (80010108)':
Automation error
The object invoked has disconnected from its clients

If I then try to do a manual copy, Excel crashes and

sends
a Dump to Microsoft.

If I start again and do the copies manually, then on the
third time, Excel crashes and sends a Dump to Microsoft.

I was thinking I was running out of resources, so I
deleted a large number of sheets and reduced the size of
the workbook by 60%, but the problem still occurs evrery
time.

Any ideas gratefuly received.

Don


--

Dave Peterson

.


--

Dave Peterson

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Shows Disconnected Network Drive in Excel "get data from other sou Kissphreek Excel Discussion (Misc queries) 0 July 22nd 09 09:37 PM
VBA connected vs disconnected from network? TSW632 Excel Discussion (Misc queries) 1 November 14th 08 05:14 AM
disconnected chart objects KenRogers Charts and Charting in Excel 0 August 5th 08 08:03 PM
More than one copy of EXCEL 2003 invoked zhj23 Excel Discussion (Misc queries) 1 May 4th 06 02:36 PM
Excel - let search for more than one disconnected word in a cell Milinds Excel Worksheet Functions 1 January 30th 06 11:20 PM


All times are GMT +1. The time now is 10:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"