Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Someone helped me with the code to merge all the files under one folder
onto one spreadsheet. However, from the code below is there a way I can tell Excel to open a file and copy from a specific worksheet? Application.ScreenUpdating = False Dim FName As String Dim WB As Workbook Dim Dest As Range Const FOLDERNAME = "" ChDrive FOLDERNAME ChDir FOLDERNAME Set Dest = Range("A2") FName = Dir("*.xls") Do Until FName = "" Set WB = Workbooks.Open(FName) WB.Worksheets(1).Rows(2).Copy Destination:=Dest WB.Close savechanges:=False Set Dest = Dest(2, 1) FName = Dir() Loop End Sub Thank you!! --- Message posted from http://www.ExcelForum.com/ |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Merging 2 files | Excel Discussion (Misc queries) | |||
merging files | New Users to Excel | |||
merging zip files! | Excel Discussion (Misc queries) | |||
merging two files | Excel Discussion (Misc queries) | |||
Merging two different files | Excel Discussion (Misc queries) |