Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
warfollowmy_ver
Creator III
Creator III

Connect .vbs files into document and use macro from this files

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.

Labels (4)
1 Solution

Accepted Solutions
warfollowmy_ver
Creator III
Creator III
Author

Call ConnectVBS

Sub ConnectVBS
     Set objFSO = CreateObject("Scripting.FileSystemObject")
     Set objFile = objFSO.OpenTextFile("your vbs file")
     Script = objFile.ReadAll
     Call ExecuteGlobal(Script)
End Sub

View solution in original post

1 Reply
warfollowmy_ver
Creator III
Creator III
Author

Call ConnectVBS

Sub ConnectVBS
     Set objFSO = CreateObject("Scripting.FileSystemObject")
     Set objFile = objFSO.OpenTextFile("your vbs file")
     Script = objFile.ReadAll
     Call ExecuteGlobal(Script)
End Sub