hi experts
I search way to merge all data of sheets from file into one file and one sheet but the code doesn't work and doesn't give me the error the source data in source file it begins from A1 : N
Sub CopySheets()
Application.ScreenUpdating = False
Dim flder As FileDialog, FileName As String, FileChosen As Integer, wkbDest As Workbook, wkbSource As Workbook, wsDest As Worksheet, WS As Worksheet
Set wkbDest = ThisWorkbook
Set wsDest = wkbDest.Sheets("Summary")
Set flder = Application.FileDialog(msoFileDialogFilePicker)
flder.Title = "Please Select a folder and file."
FileChosen = flder.Show
FileName = flder.SelectedItems(1)
Set wkbSource = Workbooks.Open(FileName)
With wkbSource
For Each WS In .Sheets
If Not IsError(Evaluate("=ISREF('[" & wkbDest.Name & "]" & WS.Name & "'!$A$1)")) Then
WS.UsedRange.Cells.Copy
With wsDest.Cells(wsDest.Rows.Count, "A").End(xlUp).Offset(2)
.PasteSpecial xlPasteValues
.PasteSpecial xlPasteFormats
End With
End If
Next WS
End With
wkbSource.Close False
Application.ScreenUpdating = True
End Sub
any idea what's wrong with this code