Forum Discussion

kevinkleint's avatar
kevinkleint
Contributor
13 years ago

TextObject question

Hi,



We are trying to utilize TextObjects to search thru an unsupported grid. As part of this process we try to reference TextObjects which may or may not exist. When we reference a non-existing TextObject the vbscript crashes on the line with that reference. The On Error Resume Next doesn't trap the error nor can we assign a varialble to the TextObject and test for existance. Is there any way to deal with this dilemna?



Thanks.



P.S.



example ...



Set Cell = Nothing


on error resume next


Set Cell = objParent.TextObject(strCode,N)


on error goto 0


if Not (Cell is Nothing) Then