title: Append a Range to Log (Txt) file
body: <p>I want to append a range from <code>"A2:B" &amp; LastRow</code> to a log txt file with a <code>;</code> delimiter.</p>
  
  <p>For now I know how to read from separate cells but not from <code>"A2:B"</code></p>
  
  <p>Column <code>A</code> = text</p>
  
  <p>Column <code>B2:B</code> = <code>=IF(A2="","",1)</code></p>
  
  <p>My code:</p>
  
  <pre><code>Dim strData As String
  Dim strLine As String
  strData = ""
  Open "\\x-ap01\Log.txt" For Input As #1
  While EOF(1) = False
      Line Input #1, strLine
      strData = strData + strLine &amp; vbCrLf
  Wend
  
  strData = strData + Cells(2, 1) &amp; ";" &amp; Cells(2, 2) &amp; ";"    
  
  Close #1
  Open "\\x-ap01\Log.txt" For Output As #1
  Print #1, strData
  Close #1
  </code></pre>