CylanceProtect -- CreateObject no longer works

james_lankford

Well-known Member
Joined
Jan 11, 2009
Messages
1,172
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:

Some videos you may like

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop

Micron

Well-known Member
Joined
Jun 3, 2015
Messages
1,846
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
820
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. :)
 

Watch MrExcel Video

Forum statistics

Threads
1,101,936
Messages
5,483,783
Members
407,410
Latest member
catherinejoy

This Week's Hot Topics

  • Finding issue in If elseif else with For each Loop
    Finding issue in If elseif else with For each Loop I have tried this below code but i'm getting in Y column filled with W005. Colud you please...
  • MsgBox Error
    Hi Guys, I have the below error show up when i try and run my macro in File1 but works fine if i copy and paste the same code into file2. [ATTACH...
  • CELL FORMAT - IF CONDITION
    My Cell Format is [B]""0.00" Cr". [/B]But in the cell, it is showing 123.00 for editing. (123 is entry figure). (Data imported from other...
  • Show numbers nearly the same
    Is this possible. I have a number that can change very time eg 0.00001234 Then I have a lot of numbers 0.0000001, 0.0000002, 0.00000004...
  • Please i need your help to create formula
    I need a formula in cell B8 to do this >>if b1=1 then multiply ( cell b8) by 10% ,if b1=2 multiply by 20%,if=3 multiply by 30%. Thank you in...
  • Got error while adding column and filter
    Got error while adding column and filter In column Z has some like "Success" and "Error". I want to add column in AA if the Z cell value is...
Top