Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Earlier, I figured out how to connect a vbs file and use commands in the interface from this file https://community.qlik.com/t5/New-to-QlikView/Connect-vbs-files-into-document-and-use-macro-from-thi.... But what if I want to use functions from a file in the script itself? First I need to initialize them in the macro module, but how to do it from the script?
Is it possible?
If you first initialize functions in the interface from the vbs file in the module for macros, then functions are available in the script, if you close and then open the document, then you need to re-open the module for macros.
You have to write the VBScript function in the Edit Module, and then you can call that custom function from the load script. Here is a link regarding VBScript syntax:
https://stackoverflow.com/questions/41965404/functions-vs-sub-procedures
Here is Help on VBScript function call from the script:
If you were going to use the script function in an expression, you would need to enable the following setting:
AllowMacroFunctionsInExpressions
I cannot find anything about needing to change any other settings to use the script function from the edit module in the Load Script. Hopefully this helps you move things forward.
Regards,
Brett
You have to write the VBScript function in the Edit Module, and then you can call that custom function from the load script. Here is a link regarding VBScript syntax:
https://stackoverflow.com/questions/41965404/functions-vs-sub-procedures
Here is Help on VBScript function call from the script:
If you were going to use the script function in an expression, you would need to enable the following setting:
AllowMacroFunctionsInExpressions
I cannot find anything about needing to change any other settings to use the script function from the edit module in the Load Script. Hopefully this helps you move things forward.
Regards,
Brett