Qlik Community

Ask a Question

QlikView Integrations

Discussion Board for collaboration on QlikView Integration.

LINKEDIN LIVE: Democratizing data to enhance customer-centricity. JULY 29TH REGISTER TODAY
Showing results for 
Search instead for 
Did you mean: 
Creator III
Creator III

Change Expression Condition with Macro VB ?


I'm always amazed by the power of using QlikView through VB Macro but the lack of documentation and examples about it.

I'm trying to create a line chart with conditional expressions through VB (to quickly add 50 conditional expressions)

I'm able to remove all expressions

Set o = mydoc.GetSheetObject("CH349")

For i = 0 To o.GetProperties.Expressions.Count - 1

    o.RemoveExpression (0)


Then I add all expressions and change a Comment

myLine = 1

While Cells(myLine, 4) <> ""

    cond = Cells(myLine, 4)

    myExpr = Cells(myLine, 19)

    o.AddExpression (myExpr)


    Set pq = o.GetProperties

    Set expr = pq.Expressions.Item(myLine - 1).Item(0).Data.ExpressionData


    expr.Comment = "test"

    o.SetProperties pq

    myLine = myLine + 1


But now I would like to change the Caption of these Expressions AND to add a conditional expression for each of them

how can I do ?


0 Replies