+ Reply to Thread
Results 1 to 12 of 12

Error with Set RegExp equal to New RegExp vba

  1. #1
    Forum Contributor
    Join Date
    12-10-2008
    Location
    Austin
    Posts
    660

    Error with Set RegExp equal to New RegExp vba

    Hi all,

    I'm having to try and diagnose a problem with a co-workers PC while running an excel spread sheet with the following vba script placed into an module.
    Please Login or Register  to view this content.
    The spreadsheet runs fine on my and another co-workers PC. But when trying to run the
    same spreadsheet on this other fellows PC it errors.
    The error I received is: 430 Class does not support automation or does not support expected interface. I've done some
    searching on the subject and found some other similiar issues but no straight forward
    resolutions. To start things off, The spreadsheet is located on a network drive. He's
    connected through a laptop which we call a toughbook. I'm using a Gateway desktop.
    Both are running windows XP and excel 2003. I beleive in order for the RegExp to run,
    Microsoft VB Script Regular Expressions 5.5 has to checked in the Reference Library.
    This shows to be checked on both our PC's

    Does anyone know if there is something else that can effect the spreadsheet from running this specific code?

    Any help diagnosing this situation is appreciated.

    Thanks,

    BDB

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Error with Set RegExp equal to New RegExp vba

    Hello BDB,

    You are right about the the library needing to be loaded for the code run. I do not understand the "vba" following the RegExp assignment.
    Please Login or Register  to view this content.

    If it is to make an explicit reference to the Visual Basic libraries, it normally prefixes the object.
    Please Login or Register  to view this content.

    Can you post the full code?
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Forum Contributor
    Join Date
    12-10-2008
    Location
    Austin
    Posts
    660

    Re: Error with Set RegExp equal to New RegExp vba

    Hi Leith,

    Here's an excerpt from the WB using the code.
    The code can be found in module1, LoadSUBS().


    Thanks for your assistance.


    BDB
    Attached Files Attached Files

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Error with Set RegExp equal to New RegExp vba

    Hello BDB,

    I don't see that statement in the workbook you posted. I am not sure what to input to test the code. Can you give me an example entry to use?

  5. #5
    Forum Contributor
    Join Date
    12-10-2008
    Location
    Austin
    Posts
    660

    Re: Error with Set RegExp equal to New RegExp vba

    First, I want to re-mention,this code works fine on my PC using Excel2003 but on a
    co-workers toughbook(laptop) it's not.

    If you toggle between the buttons you should see a new list gets rebuilt in the the first
    combobox. You can ignore the 2nd combobox along with the text boxes and command buttons.

  6. #6
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Error with Set RegExp equal to New RegExp vba

    Hello BDB,

    Did you check the laptop has the Regular Expressions 5.5 reference set in the VBA references and the VBScript.dll exists ?

  7. #7
    Forum Contributor
    Join Date
    12-10-2008
    Location
    Austin
    Posts
    660

    Re: Error with Set RegExp equal to New RegExp vba

    If you're referring to the the vbscript.dll in: C:\WINDOWS\system32\
    Then, yes it exists.

    And

    Regular Expressions 5.5 is also checked in the library references when the WB is
    loaded.

    BDB

  8. #8
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Error with Set RegExp equal to New RegExp vba

    Hello BDB,

    Everything is loaded and the code works for me and you. The logical conclusion is that the user's workbook is damaged or Excel has been corrupted on the laptop.

  9. #9
    Forum Contributor
    Join Date
    12-10-2008
    Location
    Austin
    Posts
    660

    Re: Error with Set RegExp equal to New RegExp vba

    I think what I'm going to do is see if we can't get Excel reinstalled or upgraded on his pc.

    I'll get back and let you know how things go.


    Thanks,

    BDB
    Last edited by bdb1974; 09-21-2011 at 09:25 AM.

  10. #10
    Forum Contributor
    Join Date
    12-10-2008
    Location
    Austin
    Posts
    660

    Re: Error with Set RegExp equal to New RegExp vba

    Update:

    I had one of the IT guys come over and install Excel 2007 on the pc.
    This did not fix the problem. I mentioned to him that possibly the problem is not
    with the excel program but maybe a corrupt VBScript.dll file. He played around
    with this for awhile after finding some informaton about removing the 3 from the file
    from within the registry. All this did was remvoe expressions 5.5 from the reference
    library. I suggested maybe copying over the VBScript.dll with a copy from another pc.
    I copied the one off mine PC drive, since it has shown no issues. This did not
    fix the issue. I don't know if a reboot is required after copying over a dll file or not. I had to close the excel program just to copy mine to his.

    The only thing left I feel to do is maybe reimage his whole drive
    with a new OS copy and go from there.

    There's another guy in our dept that uses the same type of toughbook (laptop) as
    the one with the problem. I haven't verified yet if his excel will run the macro.
    If it does, then maybe reimaging is more a justifiable option.

    BDB

  11. #11
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Error with Set RegExp equal to New RegExp vba

    I believe you should not use a variable with the same name as the class, and the instantiation should be

    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  12. #12
    Forum Contributor
    Join Date
    12-10-2008
    Location
    Austin
    Posts
    660

    Re: Error with Set RegExp equal to New RegExp vba

    Thanks SHG for the input, but replacing

    Please Login or Register  to view this content.
    with
    Please Login or Register  to view this content.
    Only gives me another kind of error: Run-time error '424' Object required.

    Again, the code works fine on my PC as is.... but one of the intended users PC is having the issue.

    Thanks,

    BDB

+ 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