strange behaviour - move sheet
Here is my problem.
I have a vba code which basically creates 200 reports.
everything works perfectly, except, randomly, once in a while the macro stops from working saying it can't move a sheet.
(Run-time error '1004': Move method of Worksheet class failed).
If I debug, it stopes at a simple move-after-sheet-in-other-workbook line.
Sheets(sh16).Move After:=Workbooks(newRep).Sheets(sh5)
If I stop the code at that point and try to move the sheet manually, it just doesn't do it... witout any message...
I have to close everything and run it again.
The problem is that line only stops the macro randomly... the only thing I can think of is some kind of memory-issue???
The files I work with are far from reaching any limits of excel 2003. (mostly 3 pages per sheet - cca 10 sheets.
hi the symptoms are not good,
hi
the symptoms are not good, and memory definitely could be to do with it.. but unlikely given the small task that you're doing.
1st, try to uncorrupt the workbook:
http://excelexperts.com/Excel-Tips-Fix-Corrupt-Spreadsheet
Better copy then delete worksheet to prevent sided calculus
may be linked cells better copy then delete worksheet to prevent sided calculus and create a preventive new object in memory location.