title: Finding first blank row, then writing to it
body: <p>I need to find the first blank row in a workbook and write information to (row, 1) and (row, 2). I think I'm currently pretty stuck...</p>
  
  <pre><code>Function WriteToMaster(num, path) As Boolean
  
  'Declare variables
  Dim xlApp As Excel.Application
  Dim wb As Workbook
  Dim ws As Worksheet
  Dim infoLoc As Integer
  
  Set xlApp = New Excel.Application
  
  Set wb = xlApp.Workbooks.Open("PATH OF THE DOC")
  Set ws = wb.Worksheets("Sheet1")
  
  'Loop through cells, looking for an empty one, and set that to the Num
  Cells(1, 1).Select
  For Each Cell In ws.UsedRange.Cells
      If Cell.Value = "" Then Cell = Num
      MsgBox "Checking cell " &amp; Cell &amp; " for value."
  Next
  
  
  'Save, close, and quit
  wb.Save
  wb.Close
  xlApp.Quit
  
  'Resets the variables
  Set ws = Nothing
  Set wb = Nothing
  Set xlApp = Nothing
  </code></pre>
  
  <p>Thanks so much for any help.</p>