FaizanRoshan88
Member
I have code to select source wb and then copy ws to Main WB. I want to change code for selecting source wb & then ws, then code find special header name and copy entire specific columns data form sheet to Main wb. Header Name is "Name, Type, Date, Num, Item, Qty, Sale Price & Amount"
Code:
FileToOpen = Application.GetOpenFilename _
(Title:="Please choose a Report to Parse", _
FileFilter:="Report Files *.xlsx (*.xlsx), *.xlsm (*.xlsm),*.xls (*.xls),")
If FileToOpen = False Then
MsgBox "No File Specified.", vbExclamation, "ERROR"
Exit Sub
Else
Set wb2 = Workbooks.Open(fileName:=FileToOpen)
For Each Sheet In wb2.Sheets
With Sheet.UsedRange
.Copy PasteSpecialFormatsStart
Set PasteSpecialFormatsStart = PasteSpecialFormatsStart.Offset(.Rows.Count)