View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default how can detect that setting object failed

set objMatched = .Excecute(SomeString)"
cnt = objMatched.count
if cnt = 0 then
' no matches
' else
for each match in objMatched
etc
End if

Regards,
Peter T


"chfa" wrote in message
...
hi

I use VB-RegEx for pattern matching. The command "set objMatched
= .Excecute(SomeString)" fails if the pattern didn't match. I tried
"if objMatch is Nothing then ... end if" to intercept the event;
without success.

Please help me with some ideas.

thx