Move through a table in word using the tab key without adding cell

  • Thread starter Thread starter Guest
  • Start date Start date
pleasehelpme said:
How do I turn off the add a cell function so I can tab through?

The "add a row" (not cell) function happens only when you're in the last
cell in the bottom right corner of a table. So if you're trying to move
*through* one table, just tab -- but don't tab in the last cell.

If you're trying to move from one table to another, the Tab key can't do
that. You can set the Browse By button (the little circle between the double
arrows at the bottom of the vertical scrollbar) to browse by table, and then
use the double arrows to move from table to table.
 
I have a form that is locked, except for one line. I need to be able to tab
from that one line (in a table) to the first form field (in the following
table). Onscreen, it appears to be one table, but there is a continuous page
break separating the rows. Is there a way to get the tab to NOT enter a new
row, but to go to the form field in the protected portion of the document?
 
I have a form that is locked, except for one line. I need to be able to tab
from that one line (in a table) to the first form field (in the following
table). Onscreen, it appears to be one table, but there is a continuous page
break separating the rows. Is there a way to get the tab to NOT enter a new
row, but to go to the form field in the protected portion of the document?

It should be possible to write a macro to do that. The idea is to
place a macro in the template for the form, and name the macro
NextCell so it runs when the Tab key is pressed in any table cell. The
macro checks which cell you're leaving. If it's the one where you
want to jump to a form field instead, it does that; otherwise it just
moves to the next cell.

This particular version of the macro assumes that the table you're
leaving is the first table in the document, indicated by .Tables(1).
It also assumes that the form field you want to go to is the first
form field in the document, indicated by .FormFields(1). It could be
simplified a bit if you want to hard-code the row and column numbers.

Public Sub NextCell()
Dim oRg As Range
Dim nRow As Long, nCol As Long

With ActiveDocument.Tables(1)
nRow = .Rows.Count
nCol = .Columns.Count
Set oRg = .Cell(nRow, nCol).Range
If Selection.Range.InRange(oRg) Then
ActiveDocument.FormFields(1).Select
Else
Selection.Cells(1).Next.Select
Selection.Collapse wdCollapseStart
End If
End With
End Sub

See http://www.gmayor.com/installing_macro.htm if necessary.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top