Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Minimize all Server Objects

Hello,

is there a possibility to minimize all Server Objects as soon as a user opens (or leaves) the application?

We use QV 10 SR 2

Kind regards

Björn

1 Solution

Accepted Solutions
Not applicable
Author

Hello again,

I think I figured it out by myself.

With this macro I achieved my goal in my test application:

sub minimizeUserObjects()

'rem ** minimize all user objects on all sheets **

for j=0 to ActiveDocument.NoOfSheets-1

set s=ActiveDocument.Sheets(j)

for i=0 to s.NoOfSheetObjects-1
 
   objType = s.SheetObjects(i).GetObjectId
 
   if left(objType, 6) = "Server" then
      s.SheetObjects(i).Minimize
   end if

next
next

end sub

If there's a better way, please let me know

View solution in original post

4 Replies
Not applicable
Author

Is there a possibility to solve this problem with a macro?

erichshiino
Partner - Master
Partner - Master

Hi,

You can call a macro like this from a onOpen trigger:

sub minimizeobjects()

'rem ** minimize all sheet objects on sheet Main **

set s=ActiveDocument.Sheets("Main")

for i=0 to s.NoOfSheetObjects-1

    s.SheetObjects(i).Minimize

next

end sub

Not applicable
Author

Hi Erich,

thank you very much for your answer.

Your macro minimizes all objects in the application, is there any possibility to minimize only the objects which where created by the users (the objects in the .qvw.Shared file) ?

Not applicable
Author

Hello again,

I think I figured it out by myself.

With this macro I achieved my goal in my test application:

sub minimizeUserObjects()

'rem ** minimize all user objects on all sheets **

for j=0 to ActiveDocument.NoOfSheets-1

set s=ActiveDocument.Sheets(j)

for i=0 to s.NoOfSheetObjects-1
 
   objType = s.SheetObjects(i).GetObjectId
 
   if left(objType, 6) = "Server" then
      s.SheetObjects(i).Minimize
   end if

next
next

end sub

If there's a better way, please let me know