Re: Run-time error '-2147417848 (80010108)':

D

Don

Further, I have now created two files which are essentially the same. One
from scratch which does not cause the problem, and the one that causes the
problem, which I have stripped down from a project, by deleting everything.
They are obviously not the same.

The new file seems to have a hiccup at tthe third copy, but keeps going, and
then doesn't hiccup again. The old file chokes to death at the third copy.

I have been trying to fix this problem now for a year, and at one tuime
worked around it by hiding and unhiding sheets instead or copying them, but
this is no longer a viable workaround.

I can send both files to anyone that would like to see them.
 
D

Don

After reading several articles in the knowledgebase, I tried this

Sub Start()
'
Dim XLBook As Excel.Workbook
Dim XLSheet As Excel.Worksheet
'
Set XLBook = Excel.ActiveWorkbook
Set XLSheet = Excel.ActiveSheet
'
XLBook.Sheets("Three").Select
XLBook.Sheets("Three").Copy Before:=XLBook.Sheets(1)
XLBook.Sheets("Two").Select
'
End Sub

explicitly defining the Workbook, but still experience the same problem

Any ideas anyone?
 
D

Don

I notice that during the copy Excel creates a new Workbook("Book1") for a split
instant, and then it disappears.

On the third copy no new workbook is created, and oc course the sheet copy is
not completed.

Don
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top