View Single Post
  #2   Report Post  
Doug Robbins
 
Posts: n/a
Default

The following will tell you what type of formfield is in each cell.

Dim i As Long, j As Long
i = Selection.Tables(1).Rows.Count - 1
For j = 1 To Selection.Tables(1).Columns.Count
MsgBox Selection.Tables(1).Cell(i, j).Range.FormFields(1).Type
Next j


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
"FredEp57" wrote in message
...
I need some more help on tables and user forms

Suppose I have a document (userform to be exact). In that form are some
tables (lets say 3). Each table has a different number of columns (but
only
one row). Each table has distinctly different fields in the
columns (some text input, some checkbox(es), and some drop down
populated).
Idea is to have the table be dynamically grow ("Escaping" is still
tricky).
However, each new, added row MUST have the exact item in each column just
above, i.e., add a row at the bottom and copy the fields from above (but
text
fields are blank, drop down boxes populated like the previous row).
Making
sense so far?

My question is:
Can I figure out what the column above contains, then copy that item to
the
cell below?

If you need an example to look at, I have a quick one I am experimenting
with.

BTW, many thanks to Doug Robbins for his help getting me started.

Thanks
F