Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to read Multibox object value in macro?

Hi,


I need to export few pivot tables to excel and I am using macro for the same. These pivot tables are getting dynamically displayed on the basis of value of a Multibox. I need to add condition of the values of multibox in excel macro. I am able to read variables but not objects. Please help!!


Thanks,

Kirti

7 Replies
m_woolf
Master II
Master II

The multibox displays the selections for a field (or fields).

Look in the APIGuide for code to cycle through the selections in a field.

Not applicable
Author

Hi,

Thanks for response.

But I am new to Qlikview, can you please confirm where can I find this guide??

Regards,

Kirti

m_woolf
Master II
Master II

You should have a QlikView folder under My Documents. There should be a documentation folder there.

Not applicable
Author

I have found the API QVW file but this is very complex to understand so quickly. And I need to know thes olution very urgently.

Can somebody please tell me how can I read multibox value in macro code. For now I am using,

set v = ActiveDocument.GetSheetObjects("MB01").GetRelevantSelections

if v.GetContent.String = Allowed then

--stmts

end if

But this is giving error which says, object required.

Thanks,

Kirti

m_woolf
Master II
Master II

This code from the APIGuide, will display the currently selected items in a field:

set val=ActiveDocument.Fields("Month").GetSelectedValues

for i=0 to val.Count-1

    if val.Item(i).IsNumeric then

       msgbox(val.Item(i).Number)

    else

       msgbox(val.Item(i).Text)

    end if

next

m_woolf
Master II
Master II

This is also from the APIGuide:

sub test
     x=ActiveDocument.GetSheetObject("MB07").GetRelevantSelections
     for i = lbound(x) to ubound(x)
          msgbox(x(i))
     next
end sub

Not applicable
Author

Thanks a lot. It is working now.