VBA CreateObject() not working in 2016 x64

Sephaerius

New Member
Joined
May 30, 2013
Messages
45
I'm using the GetBoiler function by Ron de Bruin to grab an Outlook signature for an email VBA function. This function has historically worked perfectly in 2013 x64, however I have recently been upgraded by my organization to 2016 x64, and the CreateObject() command now throws error 429 ActiveX component can't create object.
I've Googled all morning to try to figure out the fix or workaround, with no luck. The most I was able to find was someone who commented that "something changed" with objects between 2013 and 2016, but it wasn't specified what, or how to repair it.

Code:
Function GetBoiler(ByVal sFile As String) As String
    Dim fso As Object
    Dim ts As Object
    Set fso = CreateObject("Scripting.FileSystemObject")      '<-- error on this line
    Set ts = fso.GetFile(sFile).OpenAsTextStream(1, -2)
    GetBoiler = ts.readall
    ts.Close
End Function

So far I've checked my Trust Center settings, my Internet Security settings, I've run a Repair on Office 2016, I've run Regsvr32, and I've checked my References. I'm at my wits end on troubleshooting this - so if anyone has any suggestions to walk through please help!
 
great! I will give link which expain how to convet early binding to late binding.
 
Last edited:
Upvote 0

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
I would not be surprised if you go back to createobject() it works now too lol.
 
Upvote 0
In the new workbook?
 
Upvote 0
Based on this and your other post, I would consider a full uninstall and reinstall of Office.
 
Upvote 0
Based on this and your other post, I would consider a full uninstall and reinstall of Office.

You're probably right. My Office 16 was installed via VPN over a shoddy wifi connection, so it's possible there was corruption. I was able to get a hold of another user in my organization who also runs 2016 x64, and I tested my bugged file on his machine, and it all ran without issue. So it seems both this and my other post have something specific to do with my install.

I'm on Win 7 64 Pro - are there any specific Windows updates I need to know about in terms of installing or even removing specific ones? Or any other components I need to verify? Just asking to cover all my bases in case the total uninstall and reinstall doesn't work.
 
Upvote 0
I wanted to follow up and let everyone know that the root cause of my issue may not be having to reinstall Office. Based on a tip I found elsewhere, I noticed that my employer has something called CylancePROTECT on my machine. I enabled it's notifications, and upon trying to execute my macros I'm getting notified that Cylance "protected" me from it. Yay? So, I'm going to engage my IT resources to get this changed.
 
Upvote 0

Forum statistics

Threads
1,214,631
Messages
6,120,645
Members
448,974
Latest member
DumbFinanceBro

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