Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
Is there a possibility to solve this problem with a macro?
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
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) ?
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