Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
In my documents vbs scripts are used in the macro editing module. All these subroutines work on events selected in the field or variables.
I want to centralize these vbs scripts.
Is it possible to store the scripts in vbs files, connect them via the vbs editing module or through the script, and also call for selection events in the field or variables?
This is necessary for centralized editing of vbs scripts so that each time you do not open 100 documents and 100 do not edit the same code in the macro editing module.
Once again, macros work on document triggers.
Call ConnectVBS
Sub ConnectVBS
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("your vbs file")
Script = objFile.ReadAll
Call ExecuteGlobal(Script)
End Sub
Call ConnectVBS
Sub ConnectVBS
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("your vbs file")
Script = objFile.ReadAll
Call ExecuteGlobal(Script)
End Sub