Hi all,
I need to be able to select the first blank row in my spreadsheet, however I am doing this from a VB app, and not within Excel itself.
The VB abb creates an excel workbook using this code
However in a number of different functions I wish to write to the next available row, how can I find this. I have tried this code, but with no luck
Thanks in advance
I need to be able to select the first blank row in my spreadsheet, however I am doing this from a VB app, and not within Excel itself.
The VB abb creates an excel workbook using this code
Code:
Public Function Create_Workbook()
' Start Excel and get Application object.
Set oXL = CreateObject("Excel.Application")
oXL.Visible = True
' Get a new workbook.
Set oWB = oXL.Workbooks.Add
Set oSheet = oWB.ActiveSheet
End Function
However in a number of different functions I wish to write to the next available row, how can I find this. I have tried this code, but with no luck
Code:
Dim oRng As Excel.Range
oRng = oSheet.Cells(Range("a65536").End(xlUp).Row + 1, 1).Select
Thanks in advance