incorrect property value in vba macros

asked 2016-05-31 08:35:02 +0200

dseabroo gravatar image

updated 2016-05-31 09:08:21 +0200

JohnSUN gravatar image
if cell.type = and _
   index.type= 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?

edit retag flag offensive close merge delete


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

JohnSUN gravatar imageJohnSUN ( 2016-05-31 09:10:07 +0200 )edit