Interesting question. In theory, it should be possible, with some limitations and a little complexity:
- You will be able to invoke Subs but not functions. In particular, you will not be able to use macro functions from your load script.
- You can call functions from the load script using EXTERNAL to invoke the cscript, or from a normal macro be creating a shell object to do the same. You will not be able to return anything to your Qlikview model.
- The external macro would have no knowledge of your model, so it will not be able to manipulate objects or process any data from the model. It could open and manipulate a copy of the model.
I am curious why you would want to do this. It is unfortunately not a practical way to 're-use' the code.
You can run VBScript externally to QlikView, no problem.
You need to createobject to QlikTech.QlikView. This will open QlikView if it is not open.
Note that you will need to have a named user CAL for this to work on your files.