Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Status bar

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

3 Replies
Siva_Sankar
Master II
Master II

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

Siva_Sankar
Master II
Master II

Or you can use MsgBox "Your message" in between your macros to know which stage it is running.

Regards,

siva

Not applicable
Author

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