A
Arno
Hi,
I want to jump to the first cell of the last row in a table, when the cursor
is already within that table. There are multiple tables in the document.
I tried this:
Public Sub Last_row()
If Selection.Information(wdWithInTable) Then
X = Selection.Information(wdMaximumNumberOfRows)
Selection.Rows(X).Cells(1).Select
End If
End Sub
but it fails at the Select line.
Can anyone help?
Regards,
Arno
I want to jump to the first cell of the last row in a table, when the cursor
is already within that table. There are multiple tables in the document.
I tried this:
Public Sub Last_row()
If Selection.Information(wdWithInTable) Then
X = Selection.Information(wdMaximumNumberOfRows)
Selection.Rows(X).Cells(1).Select
End If
End Sub
but it fails at the Select line.
Can anyone help?
Regards,
Arno