Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Populate data in Straight Table cell using Macro

Hi,

I have a straight table and I need to populate one column [Stat as EX] on pressing a button using a macro. Below is the straight table.

Image1.bmp

I have written the the following macro.

Sub CalculateSummary1

    'On error resume next

    set budget = ActiveDocument.GetSheetObject( "CH2033" )

    for RowIter = 1 to budget.GetRowCount-1

         'rif = budget.GetCell(RowIter,3).Number

         MsgBox budget.GetCell(RowIter,7).Text

         budget.SetInputFieldCell RowIter,7,"test"

     next

End Sub

Now when I am executing the code, the executing is getting stuck in the following line

Image2.bmp

Can you please help.

Thanks,

Sudip

1 Reply
Anonymous
Not applicable
Author

Hi Sudip,

There are two problems here, I think:

1. You're trying to enter text, while input fields are numeric.

2. The error message tells me that you don't use a valid expression for input fields.

To make it work, make sure that column contains expression like inputsum(your field here).  Test it with a number rather than string in the macro.

Regards,

Michael