View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Alex St-Pierre Alex St-Pierre is offline
external usenet poster
 
Posts: 169
Default How to count the cells in a table row ?

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
--
Alex St-Pierre