CylanceProtect -- CreateObject no longer works

james_lankford

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

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
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
 
Upvote 0
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. :)
 
Upvote 0

Forum statistics

Threads
1,214,599
Messages
6,120,453
Members
448,967
Latest member
grijken

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top