How to count the cells in a table row ?

G

Guest

Hi,
Does anyone know how to count the cells inside a table row ?
I already tried the following but, (because of merged cells), doesn't work
all the time. Is there an other way to count the cells in a row?

The following two methods doesn't work all the time:
iCount = Tables(1).Rows(1).Cells.Count
or
Dim oCell as Cell
Set oCell = Tables(1).Cells(1,1)
Do Until oCell.RowIndex = 4
oCell.Next
iCount = iCount + 1
Loop
 

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

Top