Malwarebytes doesn't like my code?

Jeff H
4StarLounger
Posts: 415
Joined: 31 Oct 2017, 20:07

Malwarebytes doesn't like my code?

Post by Jeff H »

Just since getting my new computer, running Windows 11, Malwarebytes has been throwing an “Exploit” warning whenever I exit one of my Access databases.

I think it must be reacting to the code I have which saves the current record when closing a particular form. The reason for the code is so that when I open the db it will go to the record that was active when I closed it. I get the error from Malwarebytes when I close the db. And when I just close the form that has the code, it closes Access as well as giving the exploit warning. I’ve attached the Malwarebytes log entry and here’s the code:

Code: Select all

Private Sub Form_Unload(Cancel As Integer)
    On Error GoTo GetOut
    If Not IsNull(Me.TitleID) Then
        CurrentDb.Execute "UPDATE tblLastLookup SET LastLookup=" & _
            Me.TitleID, dbFailOnError
    End If
GetOut:
End Sub
Access Error.txt
You do not have the required permissions to view the files attached to this post.

User avatar
HansV
Administrator
Posts: 78391
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Malwarebytes doesn't like my code?

Post by HansV »

See Anti-exploit settings in Malwarebytes Nebula and click 'Restore Defaults' in the 'Anti-exploit settings' dialog shown.
Best wishes,
Hans

Jeff H
4StarLounger
Posts: 415
Joined: 31 Oct 2017, 20:07

Re: Malwarebytes doesn't like my code?

Post by Jeff H »

Hmm. I go to Settings > Security > Exploit Protection > Advanced Settings and there I see a slightly different version of the dialog illustrated in the page you linked me to (see attached).

However, the default setting has “Disable loading of VBScript libraries” checked under MS Office, as shown in the screenshot. Neither checking or unchecking that box corrects the problem in Access, though.
Malwarebytes Anti-Exploit.png
You do not have the required permissions to view the files attached to this post.

User avatar
HansV
Administrator
Posts: 78391
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Malwarebytes doesn't like my code?

Post by HansV »

Activate the 'Application behavior protection' tab.
Clear the 'Protection for Office WMI abuse' check box.
Does that help?
Best wishes,
Hans

Jeff H
4StarLounger
Posts: 415
Joined: 31 Oct 2017, 20:07

Re: Malwarebytes doesn't like my code?

Post by Jeff H »

Yes!! I could have fiddled around all day and not have guessed the secret.

Thanks Hans!