0
"E15"や "A3"のように、最初の空のセルの名前が必要です worksheet.Cells.Nameとworksheet.Rows.Nameを使用しようとしましたが、そうではありません 正しい構文...助けてください!vb.netでExcelのセル名を取得するにはどうすればよいですか?
は、ここに私のコードです
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
(更新)
は、私は、次のコードを使用し、$ Eに$ 15だ、「$」記号アウトでアドレスを取得する方法はありますか?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
から取られている必要はありません任意の$兆候を省略しなければならない
を使用すると、 '.Address'何です探している? – BruceWayne
vb.netまたはvbaを使用していますか?私の帽子の上からそれを試していないから:これまでずっと繰り返していたセルなので、if(cell.value = "")、次にcell.address – surfmuggle
google luke:[relative-cell-address-needed- excel-vba](http://stackoverflow.com/questions/24933692/) また、[find-and-select-first-blank-cell-in-column-b-excel-vba](http: //stackoverflow.com/questions/25155751/)または[select-first-empty-cell-in-column-f-starting-from-one-using-off-offset](http://stackoverflow.com/質問/ 14957994 /) – surfmuggle