MS Access Automation Error on updating to Version 2108

Malcolm Weller 11 Reputation points
2021-09-29T16:38:13.653+00:00

Some copies of MS Access at my organisation have updated to; Microsoft® Access® for Microsoft 365 MSO (16.0.14326.20384) 64-bit.
Subsequently they are experiencing; Automation error -2146232576 (80131700) when setting references to some libraries e.g.
Set obj = CreateObject("System.Text.UTF8Encoding") 'Automation error!
Set enc = CreateObject("System.Security.Cryptography.SHA1CryptoServiceProvider") 'Automation error!
Set sha1 = CreateObject("System.Security.Cryptography.SHA1Managed") 'Automation error!
But works OK for these;
Set objExcel = CreateObject("Excel.Application") 'NO error
Set objHTTP = CreateObject("MSXML2.ServerXMLHTTP") 'NO error
Set Stream = CreateObject("ADODB.Stream") 'NO error

An older copy of MS Access; Microsoft® Access® for Microsoft 365 MSO (16.0.12527.20260) 64-bit sets all the object references with no problem.

To reproduce the problem just run the following code in an updated copy of Access;
Sub testAutomationError()
Set obj = CreateObject("System.Text.UTF8Encoding") 'Automation error!
Set enc = CreateObject("System.Security.Cryptography.SHA1CryptoServiceProvider") 'Automation error!
Set sha1 = CreateObject("System.Security.Cryptography.SHA1Managed") 'Automation error!
End Sub

Has the update to Access caused the problem or is there another reason?

Any help appreciated.
Cheers,
Mal.

Microsoft 365 and Office | Access | Development
{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.