vsto outlook addinからExcelシートの最後の空のセルを検索するにはどうすればよいですか?vsto - VB - outlook addinの列の最後のセルを見つける
私はスコット・ホルツマンのコメントによると、私はそれを更新した次のコード(コンパイルではない)
Imports Excel = Microsoft.Office.Interop.Excel
Dim ExcelApp As New Excel.Application
Dim ExcelWorkbook As Excel.Workbook
Dim ExcelWorkSheet As Excel.Worksheet= ExcelWorkbook.Worksheets(1)
Dim ExcelRange As Excel.Range = ExcelWorkSheet.Range("A1","A600")
Dim currentFind As Excel.Range = Nothing
Dim firstFind As Excel.Range = Nothing
currentFind = ExcelRange.Find("*", , Excel.XlFindLookIn.xlValues, Excel.XlLookAt.xlPart, Excel.XlSearchOrder.xlByRows, Excel.XlSearchDirection.xlNext, False)
While Not currentFind Is Nothing
' Keep track of the first range you find.
If firstFind Is Nothing Then
firstFind = currentFind
' If you didn't move to a new range, you are done.
ElseIf currentFind.Address = firstFind.Address Then
Exit While
End If
currentFind = ExcelRange.FindNext(currentFind)
End While
ExcelWorkbook.ActiveSheet.range(currentFind).Select()
を持っていますが、今、私は、エラーメッセージが表示されます:HRESULT:0x800A03EC
解決策を質問の更新ではなく、回答として投稿してください。これは将来の訪問者の混乱を避けるためです。変更は正確に失われるわけではなく、あなたはあなたの[リビジョン](https://stackoverflow.com/posts/46711104/revisions)でそれらを拾うことができます。 – Bugs