Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
warfollowmy_ver
Contributor 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.

1 Solution

Accepted Solutions
warfollowmy_ver
Contributor III

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

Call ConnectVBS

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

1 Reply
warfollowmy_ver
Contributor III

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

Call ConnectVBS

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