ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how can detect that setting object failed (https://www.excelbanter.com/excel-programming/434590-how-can-detect-setting-object-failed.html)

chfa

how can detect that setting object failed
 
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

Peter T

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




Dave Peterson

how can detect that setting object failed
 
Could it as simple as your typo in .execute????

chfa wrote:

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


--

Dave Peterson

Peter T

how can detect that setting object failed
 
.execute

and I've propagated it !

Peter T

"Dave Peterson" wrote in message
...
Could it as simple as your typo in .execute????

chfa wrote:

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


--

Dave Peterson




Lupussilvae

how can detect that setting object failed
 
Hi Dave,

Could it as simple as your typo in .execute????


Of Course it's only a typo but I've regret saying that's not the
answer at all. the answer was provided by Peter.

Nevertheles thanks for the hint.

Chris, the steppenwolf


All times are GMT +1. The time now is 01:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com