Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have tried the code, and I cannot get the same error. This is the code I
used: Sub test() Application.EnableEvents = False Application.ScreenUpdating = False Dim fso Set fso = CreateObject("Scripting.FileSystemObject") PathOld = "c:\old\" 'Change as needed Path = "c:\new" ''Change as needed Filename = Dir(Path & "\*.xls", vbNormal) Do Until Filename = "" Set Wkb2 = Workbooks.Open(Filename:=Path & "\" & Filename) For Each WS In Wkb2.Worksheets WS.Copy After:=ThisWorkbook.Sheets(ThisWorkbook.Sheets.Cou nt) Next WS Wkb2.Close False fso.MoveFile Path & "\" & Filename, PathOld Filename = Dir() Loop Application.EnableEvents = True Application.ScreenUpdating = True End Sub Miguel. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Move excel file to desk top? | Excel Discussion (Misc queries) | |||
Excel Outlook Attachments opening after several errors everytime | Setting up and Configuration of Excel | |||
Hyperlinks - Move file to local drive, all links break | Excel Discussion (Misc queries) | |||
Links picking up values from an older version of linked file | Links and Linking in Excel | |||
How do you open a template at startup? | Excel Discussion (Misc queries) |