title: Prompt user to select multiple files and perform the same action on all files
body: <p>The user has hundreds of text files and requires making a change in the data before saving and closing them.</p>
  <p>Below is the code I have for a single file; how can I make it handle multiple files?</p>
  <pre><code>Sub transformTxt()
      vFileName = Application.GetOpenFilename(&quot;Text Files (*.edi),*.txt&quot;) 'prompt file selection
      Workbooks.OpenText Filename:=vFileName, _
                         Origin:=xlMSDOS, StartRow:=1, DataType:=xlDelimited, _
                         TextQualifier:=xlDoubleQuote, _
                         ConsecutiveDelimiter:=False, Tab:=False, _
                         Semicolon:=False, Comma:=False, Space:=False, _
                         Other:=True, OtherChar:=&quot;*&quot;, TrailingMinusNumbers:=True, _
                         Local:=True                              'open *delimited txt in excel
      
      Call Transform                                      'replace values in prompt file
      
      ActiveWorkbook.SaveAs Filename:=SaveToDirectory &amp; ActiveWorkbook.Name &amp; &quot;.xls&quot;, _
                            FileFormat:=xlWorkbookNormal
      ActiveWorkbook.Close                                  'save and close it
  End Sub
  </code></pre>