incorrect property value in vba macros

if cell.type = com.sun.star.table.CellContentType.TEXT and _
   index.type= com.sun.star.table.CellContentType.TEXT then
     celltx = cell.text
     indextx = index.text
     if instr(1, celltx, indextx) then
          msgbox celltx
          found = found +1
     end if
end if

The above VBA code is giving me a incorrect property type error for the second line assignment of celltx. This does not seem to make sense. Does anyone have any ideas?

What is a type of celltx ? How do you declare it? What about celltx = cell.getString() ?