Hi Guys,

Pretty straightforward process:
1) Download and open workbook from URL
2) Copy all worksheets in the downloaded workbook and paste them into current workbook ("My GF Model").
3) Close downloaded workbook.

I have copied in the code that I am using below.

The downloaded workbook has multiple sheets that I want to copy to my existing workbook.

Currently, the code is only copying the first worksheet in the downloaded workbook and ignoring the rest.

Any pointers on how I can change this so it copies all worksheets in the downloaded workbook?

Thank you in advance!


Sub OpenXLSfromURL()
Dim wbMe As Workbook
Dim wsNew As Worksheet
Dim w As Integer
Dim wbURL As Workbook
Dim url As String

Set wbMe = ThisWorkbook
url = Worksheets("Login").Cells(18, 8)
Set wbURL = Workbooks.Open(url)

'## Add code to copy this data to your workbook and/or manipulate the data...'
w = wbMe.Sheets.Count

'## Add a new worksheet to the end of ThisWorkbook:'
Set wsNew = wbMe.Sheets.Add(After:=wbMe.Sheets(w))

'## Copy & Paste this data in to our new worksheet:'
wbURL.Sheets(1).Cells.Copy Destination:=wsNew.Range("A1")

'## Close the downloaded version which we no longer need:'
wbURL.Close

End Sub