Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

How to change a button-caption by vb-script?

Hi all!

It is possible to change a button-caption with a vb-script?

My button:

set Obj = ActiveDocument.GetSheetObject("CH01")

Thanks

Daniel

4 Replies
MVP
MVP

How to change a button-caption by vb-script?

Hi,

Can you explain when the button caption should be changed. 

You can use variable or dynamic expression to assign caption for the button instead going for macro.

Regards,

Jagan.

Not applicable

How to change a button-caption by vb-script?

Hi Jagan,

the button starts a vb-macro which will take nearly a minute.

The button-caption should change to "Please wait..." while the macro runs (at the beginning) to give a signal to the user that qlikview is working. The last command in the macro should turn the caption back.

Regards

Daniel

MVP
MVP

How to change a button-caption by vb-script?

Hi Daniel,

Add two more actions to the button.  One before the macro and the other after the macro.  In the first action change the value of a variable to "Please wait..." and in the last action change the value of the variable to original caption.  Now use this variable value as caption to the button.

Hope this helps you.

Regards,

Jagan.

Not applicable

How to change a button-caption by vb-script?

Hello again,

thanks for your help.

The problem is that die second action (macro) starts bevor the changing of the variable-value can take effect. So in the end the button-caption is always the same.

Here same screenshots (Language=German):

screenshot.jpg

screenshot2.jpg

Regards

Daniel

Community Browser