title: Adding a Cell Reference to a file name
body: <p>I am trying to save a file using VBA but the file name needs to reference a cell within the Workbook in which I am running the Macro from.</p>
  
  <p>I need to copy data from a tab within an Macro enabled workbook into a new comma separated text file. The name of the text file (output file) should contain a reference to a cell in the Workbook from which the Macro is being ran.</p>
  
  <p>Another issue that I am having is that I would like to change the delimiter in the output file to a pipe delimited file, and not a comma separated file. Is this possible?</p>
  
  <p>This is what I have tried</p>
  
  <pre><code>Sheets("Cash Sheet").Select
      Rows("1:100000").Select
      Selection.Copy
      Workbooks.Add
      Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, 
  SkipBlanks _
          :=False, Transpose:=False
      Application.CutCopyMode = False
      Application.DisplayAlerts = False
          ActiveWorkbook.SaveAs fileName:= _
          "C:\Desktop\CashBook_\" &amp; Range("E3") &amp; ".txt", FileFormat:=xlCSV, 
          CreateBackup:=False
      ActiveWindow.Close
      Sheets("Control Sheet").Select
      Range("A1").Select
  </code></pre>