+ Reply to Thread
Results 1 to 4 of 4

Instr with RegEx - Runtime error 5017 (RegEx Code provided)

  1. #1
    Valued Forum Contributor
    Join Date
    04-13-2011
    Location
    Ottawa, Canada
    MS-Off Ver
    365
    Posts
    1,067

    Instr with RegEx - Runtime error 5017 (RegEx Code provided)

    Hello,

    I found the following Instr function with RegEx.

    The code Always stuck at 'set found = regEx.Execute(SearchIn).

    Can anyone help me what's wrong with it?

    Note that I've also checked the Microsoft VBScript Regular Expressions (1.0 or 5.5) and still is giving the same error.

    Please Login or Register  to view this content.
    NOTE: Was able to resolve by using "\\([0-9]+) ([0-9]+)\\" instead of "\## ####\"
    Last edited by dluhut; 09-28-2018 at 05:21 PM.

  2. #2
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Instr with RegEx - Runtime error 5017 (RegEx Code provided)

    Hello
    Can you give more details?
    How did you use the UDF? Upload sample for better explanation
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  3. #3
    Valued Forum Contributor
    Join Date
    04-13-2011
    Location
    Ottawa, Canada
    MS-Off Ver
    365
    Posts
    1,067

    Re: Instr with RegEx - Runtime error 5017 (RegEx Code provided)

    The UDF is basically used in a macro.

    Please Login or Register  to view this content.

  4. #4
    Valued Forum Contributor
    Join Date
    04-13-2011
    Location
    Ottawa, Canada
    MS-Off Ver
    365
    Posts
    1,067

    Re: Instr with RegEx - Runtime error 5017 (RegEx Code provided)

    I think I realized the problem. The problem is because I have the "\". So if I want the "\" included in the search, how do I go about doing it?
    Last edited by dluhut; 09-28-2018 at 05:20 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Simplification for regex code to replace numbers in a comma delimited string
    By sintek in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-08-2018, 06:30 AM
  2. ByRef type Mismatch error with RegEx
    By Bob1980 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-20-2017, 02:18 PM
  3. [SOLVED] RegEx pattern, code exacuting but doing nothing
    By capson in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-23-2015, 03:48 PM
  4. Not able to use the regex in code...
    By lifeankit in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-22-2014, 06:54 AM
  5. Need a new regex .pattern for comparison code
    By Swiss Cheese in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-06-2012, 09:16 PM
  6. RegEx Object Error
    By duckboy1981 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-03-2009, 04:20 AM
  7. Runtime Error 13 in provided Macro
    By BenOggo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-19-2008, 03:23 AM

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