Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
As it can be seen in the other posts concerning this topic,
since QlikView Version 10.0 there is no longer any debugging functionality for VBScript in Qlikview.
And it seems that QlikTech is not willing to integrate debugging tools in the near future
Without a debugger writing VBScript Code can be very hard.
Therefore I tried another approach: Why not use the integrated debugger in Microsoft Excel?
To be able to debug via Excel I took the following steps:
After all this steps the Excel debugger can be used and everything works quite well. The need to adapt the code is a little drawback, but If you try to design your initial QV code according to the Excel incompatibilities, then this is no big deal.
Has anybody else experiences with a debugging solution? Do you think the solution described is useful or do you have any suggestions or enhancements?
I'm looking forward to any comments 🙂
Kind regards
Chris
Great idea Chris. I always struggled debugging VB Script. I generally do that with the MsgBox approach! I understand it's not ideal but something is better than nothing.
What do you mean by - "I installed the QlikView Plugin (which is also needed for the enhanced WebView of QlikView in the IE)"? In your first point...
Thanks,
DV
There is a QlikView plugin used for the native look of QlikView Apps in the IE.
This plugin also contains the *.ocx files needed for the Excel integration.
As the plugin is a part of the QlikView desktop client installation it should be already installed and you can skip that step 🙂
Chris
Yep right, it's the IE plugin...
Hi Chris,
I have been trying to setup your great suggestion and have got everthing going except for the
thanks regards Peter
Sub Init()
'***Init Global Variables (e.g. newline or tab character)
vNl = Chr(13) & Chr(10)
vTab = Chr(9)
'***If Code will be executed in Excel debugger, ActiveDocument is empty
If ActiveDocument = Empty Then
'***First a new QlikView App needs to be created, to be able to access the ActiveDocument and to be able to store a reference in variable doc
Set qvApp = New QlikView.Application
Set doc = qvApp.ActiveDocument
'***If the code is run directly inside the QlikView client (and not inside Excel)
Else
'***ActiveDocument can be accessed directly
Set doc = ActiveDocument
End If
End Sub
Sub qv_function_you_want_to_debug()
'***Call Init Sub to initialize ActiveDocument and all global variables.
Init
MsgBox doc.Name
'*** Put your code that you want to debug here 🙂
End Sub
Hope this code example helps... If you have further questions, do not hesitate to ask me.
If you tell me what you want to do and send me you code, I can further assist you...
Kind regards
Chris
Hi Chris
thanks for this I will have a look and let you know
have a good Xmas
regards Peter
Hi Chris,
Would you mind posting a sample excel file with a linked QV document?
I am struggling with the vbscript debugging and it would be much appreciated!
I actually got it working! Thanks a ton. This opened up alot of new possibilities for us!
Thanks,
Viggo
Perfect
I'm always happy if my work is also helpful for anybody else 🙂
Kind regards
Chris