Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Is there a way to manipulate the Status bar in Qlikview macro..so that I could see the progress of my macro.
So could somebody help me code this?
Thanks and regards,
Vj
Hi Vijay,
I was able to figure this out. I created a text box, and named it "StatusBar." I then created the below function and called the function whenever I wanted something displayed to the user DURING processing of the VB.
I found that the "WaitForIdle" command would make sure the text box would refresh such that the user would see the content in the "StatusBar" text box. I also found that the "WaitForIdle" command is expensive in terms of processing time. So I also added a parameter in the function "sUpdateScreen" that I could use to tell the function to update the screen or not. Passing "CLS" to the function clears the text box.
FUNCTION StatusBar(sStatusBar,sUpdateScreen)
set myObject = ActiveDocument.GetSheetObject("StatusBar")
set myObjectProp = myObject.GetProperties
SELECT CASE sStatusBar
CASE "CLS"
myobject.SetText ""
CASE ELSE
myobject.SetText now & ": " & sStatusBar & chr(10) & myobject.GetText
END SELECT
if sUpdateScreen = True then ActiveDocument.GetApplication.WaitForIdle
END FUNCTION
Regards,
siva
Or you can use MsgBox "Your message" in between your macros to know which stage it is running.
Regards,
siva
Thanks for your quick response Siva. It's a good way to show the progress.However I wonder instead of creating a text box, if we could somehow use ShowStatusBar property to accept string value to show at the status bar itself. I don't find much help from API in this regard.
Thanks and regards,
Vj