Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Not applicable

calculate irr in table box

hi all,

i am able to read my table using macro -

Sub ReadStraightTable

Set Table = ActiveDocument.GetSheetObject( "CH05" )

For RowIter = 1 to table.GetRowCount-1

   For ColIter = 2 to table.GetColumnCount-1

        set cell = table.GetCell(RowIter,ColIter)

        MsgBox(cell.Text)

    Next

Next

End Sub

now i want to calculate irr in table box but im not getting how to pass table values from macro above to the table box properties to calculate irr. any help would be thankful.

25 Replies
Employee
Employee

Re: calculate irr in table box

It would be easier without a macro

Which expression is inside your CH05 object?

Not applicable

Re: calculate irr in table box

yes but i want to get it done by macro. it should work like the macro will copy values from chart into a variable and then that variable can be used in text box.

the table is holding values which are not static , they are dynamic i.e. value keeps on changing.

Employee
Employee

Re: calculate irr in table box

Maybe someone can help you with your macro so.

Good luck

Not applicable

Re: calculate irr in table box

clever can you help me with how to script in macro to copy values from chart to a variable??

Re: calculate irr in table box

Hi Skid,

How you want to store the values in variable.? I have not used this before, so any expected output will be helpful for me to help you further.

Employee
Employee

Re: calculate irr in table box

Use SetContent method

set v = ActiveDocument.Variables("yourvar")

v.v.SetContent "0", True

Re: calculate irr in table box

Try to avoid Macro. First try to solve the problem with Clever solution or else someone help you

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Not applicable

Re: calculate irr in table box

hello Nagraj

this is the link what im looking to do. I have a table with that changes so want to read straight table by macro and then have to pass it to varaible so i can create a text box to calculate irr. for reading from table i used macro code as -

Sub ReadStraightTable

Set Table = ActiveDocument.GetSheetObject( "CH05" )

For RowIter = 1 to table.GetRowCount-1

   For ColIter = 2 to table.GetColumnCount-1

        set cell = table.GetCell(RowIter,ColIter)

        MsgBox(cell.Text)

    Next

Next

End Sub

this gives me the reading of table only, now i want this table values to be given to a variable so i can proceed further.

thanks for ur reply

Not applicable

Re: calculate irr in table box

it cannot be done without macro.