Home |
Search |
Today's Posts |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you comment out all the copy/paste stuff can you just open and close the
files in a loop ? Might help to simplify the situation for debugging. You do have two different counters, right? iFilesUsedCounter and iFileCounter ? Tim "MarkS" wrote in message ... Hi Tim, Have tried a 10 second delay no improvement Do While iFilesUsedCounter < 9 ' Open AFMA WorkBook sFileName = AFMAFiles(iFileCounter).sFileName Debug.Print sAFMAPathName & sFileName Workbooks.Open sAFMAPathName & sFileName Cells.Select Selection.Copy ThisWorkbook.Activate Sheets("AFMA Loader").Select Cells.Select ActiveSheet.Paste Selection.Copy Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Windows(sFileName).Activate Application.CutCopyMode = False 'Clear Clipboard ActiveWindow.Close saveChanges:=False some other stuff to put it in the right place do it again until we have a complete set "Tim Williams" wrote: Without seeing the code it's hard to say exactly what the problem might be. Try putting a small delay before opening each file and see if that fixes it. Tim. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Unable to read file | Excel Discussion (Misc queries) | |||
Unable to Read File | Links and Linking in Excel | |||
Unable to Read File | Excel Discussion (Misc queries) | |||
unable to read file | Excel Discussion (Misc queries) | |||
"Unable to read file" error message when opening a Excel file that contains a PivotTable report. | Charts and Charting in Excel |