I need the name of the first empty cell in a column, for example "E15" or "A3" I've tried using worksheet.Cells.Name and worksheet.Rows.Name but I don't think that is the correct syntax... please help!
Here's my code
Dim xlApp As Excel.Application
Dim xlWorkBook As Excel.Workbook
Dim xlWorkSheet As Excel.Worksheet
Dim misValue As Object = System.Reflection.Missing.Value
xlApp = New Excel.Application
xlWorkBook = xlApp.Workbooks.Add(eXe)
xlWorkSheet = xlWorkBook.Sheets("sheet1")
Dim eColumn As Excel.Range = xlWorkSheet.Range("E2:E15")
Dim rCell As Excel.Range
For Each rCell In eColumn
If rCell Is Nothing Then
Dim LastCell As String = xlWorkSheet.Rows.Name
MsgBox(LastCell)
End If
MsgBox(rCell.Value)
Next rCell
(update)
I used the following code and got $E$15, is there a way to get the address with out the "$" symbol?
For Each rCell In eColumn
If rCell.Value = "" Then
Dim LastCell As String = rCell.Cells.Address
MsgBox(LastCell)
End If
MsgBox(rCell.Value)
Next rCell