title: How do I merge multiple selected excel files in VBA?
body: <p>I'm new with VBA and I'm wondering on how to merge multiple selected excel files using VBA. I tried coding the part of selecting files. I've researched and tried copying the codes on the internet and did some editing. I learned that you can add filters so I did that. But sometimes, the excel files won't show even if I added the correct filter (based on what I've researched). I really need to merge multiple selected excel files. I hope you can help me.</p>
  
  <p>I'm using a userform, btw. One button that would allow to select and merge the selected files. And if possible, I want the user to see the path of the selected files. I don't know yet on how to do that, or what tool should I use, like listbox or what. Thanks in advance!</p>
  
  <p><strong>Update!</strong></p>
  
  <p>I have a code for selecting multiple excel files. What I need now is how to merge the files that I selected.</p>
  
  <pre><code>Dim FileNames As Variant
    Dim Msg As String
    Dim I As Integer
    FileNames = Application.GetOpenFilename(MultiSelect:=True)
    If IsArray(FileNames) Then
        Msg = "You selected:" &amp; vbNewLine
        For I = LBound(FileNames) To UBound(FileNames)
            Msg = Msg &amp; FileNames(I) &amp; vbNewLine
        Next I
        MsgBox Msg
        tbPath.Value = Msg
    Else
        MsgBox "No files were selected."
    End If
  </code></pre>