Hello All

I am looking for VBA code that will do the following:

1 Open a 'file open' box so you can select a location and select multiple xlsx files
2 Open each file selected
3 copy the first worksheet in each selected file
4 Add those copied worksheets to an existing file
5 Close all of the workbooks except the one with the new copied worksheets

I have the following code with covers steps 1 and 2, but the issue I am facing is that the selected files take a long time
to open and also seem to slow down my excel

Sub loopyarray()
 
   Dim filenames As Variant
   Dim Counter As Integer
   Dim wb As Workbooks
   Dim cwb As Workbook
   

 
   filenames = Application.GetOpenFilename(, , , , True)

      Counter = 1

           While Counter <= UBound(filenames)

                 Workbooks.Open filenames(Counter)

                Counter = Counter + 1

      Wend
   End Sub
Thanking you in advance for any assistance

Thanks
Ghostly1