Hi all,
I have a working code for pulling worksheet from multiple workbooks. However, I found out some of the worksheets are of different names.
All workbooks have 1 sheet in them which I am importing but they are all of different names. How do I go about doing it? My current code look something like this... thank you in advance
I have a working code for pulling worksheet from multiple workbooks. However, I found out some of the worksheets are of different names.
All workbooks have 1 sheet in them which I am importing but they are all of different names. How do I go about doing it? My current code look something like this... thank you in advance
VBA Code:
hile strExtension <> ""
Set srcWB = Workbooks.Open(strPath & strExtension)
With srcWB.Sheets("Sheet2")
LastRow = .Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
.Range("A2:D" & LastRow).Copy desWS.Cells(desWS.Rows.Count, "A").End(xlUp).Offset(1, 0)