You can try to change your macro so:
'COPY DATA FROM ALL SHEETS TO THE MASTER SHEET
Private Sub Transfer_data_with_headings()
Workbooks.Open Filename:=FromBook
For Each FromSheet In Workbooks(FromBook).Worksheets
If LCase(FromSheet.Name) Like "*form*" Then
LastRow = FromSheet.Range("A65536").End(xlUp).Row
' copy/paste to master sheet
FromSheet.Range(FromSheet.Cells(2, 1), _
FromSheet.Cells(LastRow, NumColumns)).Copy _
Destination:=ToSheet.Range("A" & ToRow)
'set next ToRow
ToRow = ToSheet.Range("A65536").End(xlUp).Row + 1
End If
Next
Workbooks(FromBook).Close savechanges:=False
End Sub
Regards,
Antonio
Bookmarks