CylanceProtect -- CreateObject no longer works


Well-known Member
Jan 11, 2009
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


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:

Some videos you may like

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.


Well-known Member
Jun 3, 2015
Office Version
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


Well-known Member
May 25, 2013
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. :)

Subscribe on YouTube

Watch MrExcel Video

Forum statistics

Latest member

This Week's Hot Topics

  • Turn fraction around
    Hello I need to turn a fraction around, for example I have 1/3 but I need to present as 3/1
  • TIme Clock record reformatting to ???
    Hello All, I'd like some help formatting this (Tbl-A)(Loaded via Power Query) [ATTACH type="full" width="511px" alt="PQdata.png"]22252[/ATTACH]...
  • TextBox Match
    hi, I am having a few issues with my code below, what I need it to do is when they enter a value in textbox8 (QTY) either 1,2 or 3 the 3 textboxes...
  • Using Large function based on Multiple Criteria
    Hello, I can't seem to get a Large formula to work based on two criteria's. I can easily get a oldest value based one value, but I'm struggling...
  • Can you check my code please
    Hi, Im going round in circles with a Compil Error End With Without With Here is the code [CODE=rich] Private Sub...
  • Combining 2 pivot tables into 1 chart
    Hello everyone, My question sounds simple but I do not know the answer. I have 2 pivot tables and 2 charts that go with this. However I want to...