Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

inowinowski
New Contributor

Increase/Decrease Size of Text Box with Macro

Hello,

I am trying to define the size of a text box by multiplying the width and length by the value stored inside a variable. I have the following but I get an error.

sub Resize

set obj = ActiveDocument.GetSheetObject("TX26")

  set v = ActiveDocument.Variables("vCubeSize")

  v.SetContent vSize, true

set Width = ActiveDocument.fields("ITEM_CASE_WIDTH").GetPossibleValues

set Height = ActiveDocument.fields("ITEM_CASE_HEIGHT")GetPossibleValues

    set fr = obj.GetFrameDef

    set pos = fr.Rect

    pos.Width = pos.v

    pos.Height = pos.v

    obj.SetFrame fr,true,dummy

      End sub

Any help would be greatly appreciated.

Thanks

1 Reply
mwoolf
Honored Contributor II

Re: Increase/Decrease Size of Text Box with Macro

You're missing a period in the set Height line.

Have you stepped through the code to locate the error?

Community Browser