title: Open txt file, create new txt file, save old text to new file
body: <p>I'm looking for code that prompts an OpenFile box for an existing txt file (file1), then create a new file and prompts SaveAs box for the new txt file (file2). The contents of file1 to be saved in file2 later. </p>
  
  <p>So far Ive gotten to first part to work fine. I know the second part is wrong but I don't know what to do.</p>
  
  <p>My code so far;</p>
  
  <pre><code>infilename$ = Application.GetOpenFilename("Neutral Files (*.txt),*.txt", , "Open
  Neutral File", "OPEN", False)
  If infilename$ = "False" Then
      msg = MsgBox("No input file selected. Press OK to retry or cancel to quit",vbOKCancel)
      If msg = vbOK Then
          Do While msg &lt;&gt; vbCancel  'loop until user presses cancel
              infilename$ = Application.GetOpenFilename("Neutral Files (*.r01),*.r01", , "Open Neutral File", "OPEN", False)
              If infilename$ = "False" Then
                  msg = MsgBox("No input file selected. Press OK to retry or cancel to quit", vbOKCancel)
              End If
          Loop
      ElseIf msg = vbCancel Then Exit Sub
      End If
  End If
  
  outfilename$.SaveAs =:"FileName"infilename.txt",False"
  
  If outfilename$ = "False" Then
      msg = MsgBox("No output file selected. Press OK to retry or cancel to quit", vbOKCancel)
  
      If msg = vbOK Then
          Do While msg &lt;&gt; vbCancel  'loop until user presses cancel
              outfilename$ = Application.SaveAsFilename("Neutral Files (*.r01),*.r01", , "Save As Output", "SAVE", False)
  
              If outfilename$ = "False" Then
                  msg = MsgBox("No output file selected. Press OK to retry or cancel to quit", vbOKCancel)
              End If
          Loop
      ElseIf msg = vbCancel Then Exit Sub
      End If
  End If
  </code></pre>