+ Reply to Thread
Results 1 to 2 of 2

"Permission denied" error on CreateObject("vbscript.regexp")

  1. #1
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,691

    "Permission denied" error on CreateObject("vbscript.regexp")

    I am using regular expressions in a file that I have been using for a few years, and today I am suddenly getting a "Permission denied" error on this line:
    Please Login or Register  to view this content.
    I have not changed any code in the file or settings in Excel. This occurred the first time I ran this following a reboot, which was required to implement an update to Malwarebytes. As far as I can tell there were no Windows or Microsoft Office updates applied during this reboot.

    I searched extensively and this problem seems to have occurred in the past following a Windows security patch, but I could not find anything more recent than about three years old.

    EDIT: I changed to early binding with a reference to the RegExp library and get the same error when instantiating the object:
    Please Login or Register  to view this content.

    pderror.jpg
    pdcode.JPG
    Last edited by 6StringJazzer; 03-29-2021 at 07:40 AM.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,691

    Re: "Permission denied" error on CreateObject("vbscript.regexp")

    I traced this back to settings in the Malwarebytes anti-virus software. Malwarebytes must have reset a default setting in the latest update that prevents loading of VBScript when Excel starts. I was able to find the answer in the Malwarebytes forum. Further, a staffer referred to VBScript as risky and no longer supported.

    I am not aware of an alternative implementation of RegExp available for VBA.

+ 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. "Permission denied" error when trying to copy same file to multiple folders in a loop
    By Santhoshsl in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-10-2017, 10:21 AM
  2. Replies: 0
    Last Post: 07-24-2014, 08:59 PM
  3. SendKeys "{ENTER}" in Macro...............Permission denied
    By BHD in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-30-2013, 06:26 PM
  4. Trying to learn how to use CreateObject("VBScript.RegExp")
    By stanleydgromjr in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 09-04-2010, 08:07 PM
  5. Combobox using .additem "Permission Denied"
    By Schwizer in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-14-2007, 05:48 AM
  6. Permission denied in CreateObject(Excel.Application")
    By Leo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-15-2005, 01:10 PM
  7. Run-Time error "70" Permission Denied
    By Audrey in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 02-04-2005, 06:07 PM

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