I want to create a macro in Visual Basic that will select all of the Excel files from a folder and put them into a single file. I used a form with a button that will open a window to select the folders.
Here's the button code, here I can only choose the file instead of the folders:
Private Sub importer_Click()
Dim file As String
file = Application.GetOpenFilename("excel (*.xlsx),*.xlsx", , "Chose", , True)
If (LCase(file) <> "Faux" And file <> "0") Then
liste_elements.AddItem (file)
End If
End Sub