Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Action-Packed Learning Awaits! QlikWorld 2023. April 17 - 20 in Las Vegas: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
gandalfgray
Specialist II
Specialist II

Function to get Object ID?

Is there a function to get the Object ID of the currently active object?

4 Replies
kaushiknsolanki

Hi,

    Try this Code.

   

set s=ActiveDocument.ActiveSheet

for i=0 to s.NoOfSheetObjects-1

    if s.SheetObjects(i).IsActive then

     id = s.SheetObjects(i).GetObjectId

     msgbox("ID = " & id)

End if    

next

Regards,

Kaushik Solanki

Regards,
Kaushik
If reply is satisfactory, please "Like" the post.
If reply is solution, please mark as "Correct".
IamBack
Champion
Champion

please see the attached file

Sunil Chauhan
gandalfgray
Specialist II
Specialist II
Author

Thanks for your suggestions, but it's not possible (as far as I know) to use macro code in for instance the Show Condition statement for an object (a Chart, a Listbox etc), and thats where I would like to use such a function, to be able to write a generic Show Condition statement.

tanelry
Partner - Creator II
Partner - Creator II

You can use Sheet Properties > Triggers > Sheet Object Event Triggers (OnActivate, OnDeactivate) to set variables.

Then use those variables in Show Condition.