Microsoft Scripting Runtime Object Library Vba Programming

VBA is the default programming language used in Microsoft Office and Visual Basic on Windows platforms. VBA Makes use of self-contained reusable code referred as Objects. Before VBA makes use of an Object, it first needs to establish a reference to that object. The Microsoft Scripting Runtime Object.

Active3 months ago
Microsoft Scripting Runtime Object Library Vba Programming

I have used FileSystem Object in my code and it relies on the user having turned on his Microsoft Scripting Runtime Library. Is there a code by which I can turn on this library on the user's Excel application?

Kunal MathuriaKunal Mathuria

Microsoft Scripting Runtime

Microsoft

2 Answers

you can use this way:
Check if Scripting is not activated in references of the VBAproject then add it otherwise do nothing

Vasily IvoyzhaVasily Ivoyzha
4,9812 gold badges13 silver badges30 bronze badges

@Vasily's answer works, but a user will still have to enable the option Trust Access to the VBA Project object model in excel or any other microsoft office program.

File ->Options ->Trust Center ->Trust Center Setttings ->Macro Settings ->Trust Access to the VBA Project object model

thomascsthomascs

Microsoft Scripting Runtime Object Library Vba Programming

Not the answer you're looking for? Browse other questions tagged vba or ask your own question.

Comments are closed.