1

I can successfully run a VBA script in a .xlsm file on my own computer but after moving the xlsm file to a different computer, that computer throws an automation error? So how do I fix it so the script runs on the other computer?

The xlsm contains a class module that implements the script described here: https://codereview.stackexchange.com/questions/196076/bringing-the-system-text-stringbuilder-up-to-lightning-speed-in-the-vba I think this maybe a framework.NET issue so I have installed the System.Text onto the other computer (via installation of VS) and successfully tested it through a really simple C# command console. The VBA code that fails is the following (in the Class_Initialize sub-routine):

Set m.Builder = CreateObject("System.Text.StringBuilder")

When I attempt to run the VBA I get a message box with the following content:

Run-time error '-2146232576 (80131700)' Automation error

1 Answer 1

3

So I followed the successful answer given in this post: automation error -2146232576 (80131700) on creating an array

It worked for me too.

I needed to install .NET Framework 3.5 which I did by following the advice given here: https://learn.microsoft.com/en-us/dotnet/framework/install/dotnet-35-windows-10

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.