+ Reply to Thread
Results 1 to 3 of 3

VB Script Regular Expressions - Missing

Hybrid View

  1. #1
    John Taylor
    Guest

    VB Script Regular Expressions - Missing

    Hello,

    I'm trying to run a macro (created by Harlan Grove), using Excel 97 under
    Windows XP SP2, which requires "'Microsoft Scripting Runtime" and "Microsoft
    VBScript Regular Expressions 1.0".

    In the VBE under Tools, References, I can find the Scripting Runtime but not
    the VBScript Regular Expressions listed.

    As a result, the macro always stops when it gets to "Dim re As New RegExp".

    I've searched various web sites and it seems that if VBScript is installed
    (which it is, on my machine version 5.6) the reference should show up, but
    it doesn't.

    Could someone please tell me how to find the reference to Microsoft VBScript
    Regular Expressions 1.0?

    TIA

    Regards,

    John



  2. #2
    Bob Phillips
    Guest

    Re: VB Script Regular Expressions - Missing

    Try this code

    Dim re As Object
    Set re = CreateObject("VBScript.RegExp")

    rather than

    Dim re As New RegExp

    and see whether you still get that problem.

    --
    HTH

    Bob Phillips

    (replace somewhere in email address with gmail if mailing direct)

    "John Taylor" <[email protected]> wrote in message
    news:[email protected]...
    > Hello,
    >
    > I'm trying to run a macro (created by Harlan Grove), using Excel 97 under
    > Windows XP SP2, which requires "'Microsoft Scripting Runtime" and

    "Microsoft
    > VBScript Regular Expressions 1.0".
    >
    > In the VBE under Tools, References, I can find the Scripting Runtime but

    not
    > the VBScript Regular Expressions listed.
    >
    > As a result, the macro always stops when it gets to "Dim re As New

    RegExp".
    >
    > I've searched various web sites and it seems that if VBScript is installed
    > (which it is, on my machine version 5.6) the reference should show up, but
    > it doesn't.
    >
    > Could someone please tell me how to find the reference to Microsoft

    VBScript
    > Regular Expressions 1.0?
    >
    > TIA
    >
    > Regards,
    >
    > John
    >
    >




  3. #3
    John Taylor
    Guest

    Re: VB Script Regular Expressions - Missing

    Bob,

    Thanks a heap; your suggestion worked like a charm. No sign of the problem
    now.

    Easy when you know how. :-) I'm sure I could have searched for weeks and
    not found any reference to doing what you suggested.

    Regards,

    John

    "Bob Phillips" <[email protected]> wrote in message
    news:[email protected]...
    > Try this code
    >
    > Dim re As Object
    > Set re = CreateObject("VBScript.RegExp")
    >
    > rather than
    >
    > Dim re As New RegExp
    >
    > and see whether you still get that problem.
    >
    > --
    > HTH
    >
    > Bob Phillips
    >
    > (replace somewhere in email address with gmail if mailing direct)
    >
    > "John Taylor" <[email protected]> wrote in message
    > news:[email protected]...
    >> Hello,
    >>
    >> I'm trying to run a macro (created by Harlan Grove), using Excel 97 under
    >> Windows XP SP2, which requires "'Microsoft Scripting Runtime" and

    > "Microsoft
    >> VBScript Regular Expressions 1.0".
    >>
    >> In the VBE under Tools, References, I can find the Scripting Runtime but

    > not
    >> the VBScript Regular Expressions listed.
    >>
    >> As a result, the macro always stops when it gets to "Dim re As New

    > RegExp".
    >>
    >> I've searched various web sites and it seems that if VBScript is
    >> installed
    >> (which it is, on my machine version 5.6) the reference should show up,
    >> but
    >> it doesn't.
    >>
    >> Could someone please tell me how to find the reference to Microsoft

    > VBScript
    >> Regular Expressions 1.0?
    >>
    >> TIA
    >>
    >> Regards,
    >>
    >> John
    >>
    >>

    >
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1