CylanceProtect -- CreateObject no longer works

james_lankford

Well-known Member
Joined
Jan 11, 2009
Messages
1,171
so apparently the IT people at my job people did an extreme modification to the exclusion list of our CylanceProtect anti-virus program

now none of my Access programs work

problem:

I've always heard that its best practice to do

Dim adoConn As Object
Set adoConn = CreateObject("ADODB.Connection")

Dim xl As Object
Set xl = CreateObject("excel.Application")

instead of

Dim adoConn As ADODB.Connection
Set adoConn = New ADODB.Connection

Dim xl As Excel.Application
Set xl = new Excel.Application

that way you didn't have to add References in your VBA module or worry that the reference on your develop machine didn't match the reference on the user machine

so, that's what I've been doing and its always worked fine

until today ...
now none of my code works -- every module dies on the CreateObject line and Cylance pops up a little message "Access has preformed a suspicious activity and has been blocked"

I tested the 2nd form and it works with no problems

so I've put in a request to the help desk and am now rewriting my code to use the 2nd form instead of CreateObject

so goodbye best practice :(
 
Last edited:

Micron

Well-known Member
Joined
Jun 3, 2015
Messages
1,781
Sometimes the people who put the biggest road blocks in your way are the ones you work with.

Actually, I think this says the opposite of what you wrote.
you'll be tempted to take the following shortcut: Dim cn As New ADODB.Connection but that shortcut won't perform as well as the following:
Dim cn As ADODB.Connection
Set cn = New ADODB.Connection
 

welshgasman

Well-known Member
Joined
May 25, 2013
Messages
707
I seem to recall that I worked at one place where just to close an application took about 3 clicks of the mouse, just because of their security settings. :)
 

Forum statistics

Threads
1,085,432
Messages
5,383,636
Members
401,842
Latest member
stevensmith1

Some videos you may like

This Week's Hot Topics

Top