P
pmaths
Hi,
I'm pretty stuck with this.
In an Excel worksheet using VB I want to be able to goto the next
available cell in a column.
I've looked at / tried to butcher the following script which returns
the No of the row of the next blank cell in column A but I would like
it to activate this cell.
Sub FindLastCell()
Dim LastCell As Range
With ActiveSheet
Set LastCell = .Cells(.Rows.Count, "A").End(xlUp)
If IsEmpty(LastCell) Then
'do nothing
Else
Set LastCell = LastCell.Offset(1, 0)
End If
End With
MsgBox LastCell.Row
End Sub
Please - any advice would be gratefully received.
Cheers
I'm pretty stuck with this.
In an Excel worksheet using VB I want to be able to goto the next
available cell in a column.
I've looked at / tried to butcher the following script which returns
the No of the row of the next blank cell in column A but I would like
it to activate this cell.
Sub FindLastCell()
Dim LastCell As Range
With ActiveSheet
Set LastCell = .Cells(.Rows.Count, "A").End(xlUp)
If IsEmpty(LastCell) Then
'do nothing
Else
Set LastCell = LastCell.Offset(1, 0)
End If
End With
MsgBox LastCell.Row
End Sub
Please - any advice would be gratefully received.
Cheers