title: Prompt for file in Excel Macro when getting external data from text
body: <p>We're using an AutoCad utility, CleanupScale 2014, that we want to encourage users to run before using CAD files provided by others in production.  The CSV log file generated by this utility is easiest viewed when imported into Excel by getting external data from text then formatting it.  We'd like to automate as much of this process via a VBA script.</p>
  
  <p>Part of the problem is that the file to import doesn't always have the same file or sheet name.</p>
  
  <p>Can anyone help us with editing the below VBA script so that it will prompt for the CSV file to get the text from before continuing on with the formatting &amp; filtering?</p>
  
  <pre><code>Sub ScaleListCleanupLog()
  ' ScaleListCleanupLog Macro
  ' Format the Scale List Cleanup Log for easier viewing.
  
      With ActiveSheet.QueryTables.Add(Connection:= _
          "TEXT;C:\Users\User\Documents\CleanupScales48.csv", Destination:=Range( _
          "$A$1"))
          .Name = "CleanupScales48"
          .FieldNames = True
          .RowNumbers = False
          .FillAdjacentFormulas = False
          .PreserveFormatting = True
          .RefreshOnFileOpen = False
          .RefreshStyle = xlInsertDeleteCells
          .SavePassword = False
          .SaveData = True
          .AdjustColumnWidth = True
          .RefreshPeriod = 0
          .TextFilePromptOnRefresh = False
          .TextFilePlatform = 1252
          .TextFileStartRow = 1
          .TextFileParseType = xlDelimited
          .TextFileTextQualifier = xlTextQualifierDoubleQuote
          .TextFileConsecutiveDelimiter = False
          .TextFileTabDelimiter = False
          .TextFileSemicolonDelimiter = False
          .TextFileCommaDelimiter = True
          .TextFileSpaceDelimiter = False
          .TextFileColumnDataTypes = Array(2, 1, 1, 1, 1)
          .TextFileTrailingMinusNumbers = True
          .Refresh BackgroundQuery:=False
      End With
      Rows("1:1").Select
      Selection.Font.Bold = True
      Selection.Font.Underline = xlUnderlineStyleSingle
      With Selection
          .HorizontalAlignment = xlCenter
          .VerticalAlignment = xlBottom
          .WrapText = False
          .Orientation = 0
          .AddIndent = False
          .IndentLevel = 0
          .ShrinkToFit = False
          .ReadingOrder = xlContext
          .MergeCells = False
      End With
      Columns("B:E").Select
      With Selection
          .HorizontalAlignment = xlGeneral
          .VerticalAlignment = xlBottom
          .WrapText = False
          .Orientation = 0
          .AddIndent = False
          .IndentLevel = 0
          .ShrinkToFit = False
          .ReadingOrder = xlContext
          .MergeCells = False
      End With
      With Selection
          .HorizontalAlignment = xlCenter
          .VerticalAlignment = xlBottom
          .WrapText = False
          .Orientation = 0
          .AddIndent = False
          .IndentLevel = 0
          .ShrinkToFit = False
          .ReadingOrder = xlContext
          .MergeCells = False
      End With
      Range("E1").Select
      Selection.AutoFilter
      ActiveSheet.Range("$A$1:$E$24").AutoFilter Field:=5, Criteria1:= _
          "=Error saving drawing", Operator:=xlOr
  End Sub
  </code></pre>