From: Ron Rosenfeld on
On Thu, 15 Apr 2010 11:34:54 -0700, "Joe User" <joeu2004> wrote:

>Dim v As Object
>v = CreateObject("vbscript.regexp")
>
>I have select Microsoft VBScript Regular Expressions 5.5 (also tried 1.0)
>under Tools > References.
>
>But nothing is added under VBAProject \ References in the Project pane, as
>there is when I select atpvbaen.xls for example.
>
>Is that indicative of the root cause of the problem, perhaps a missing file?
>
>What is the name of the file that contains the Microsoft VBScript Regular
>Expressions 5.5 library?


You must SET an object.

Dim v as Object
set v = createobject("vbscript.regexp").

If you select Tools/References VBScript Regular Expressions 5.5, then one
syntax would be:

Dim v as RegExp
Set v = New Regexp
....
....
....
'and maybe
Set v = Nothing
--ron