Show and hide groups

Valued Contributor
Valued Contributor

 

I have been asked to write a VB6 program to show and hide groups in a 2D model view. How do I select the group to show/hide

 

Posted by: Paul Collins
Post date: 5/8/2009 12:09:33 AM

5 REPLIES

RE: Show and hide groups

Valued Contributor
Valued Contributor

Do you mean select it interactively with your mouse?

If not, you just can access through the Groups collection in your sheet:

set myGroup = oSE.ActiveDocument.ActiveSheet.Groups.item()

To hide or show it:

myGroup.Visible= True or False

Or playing with Layers:

myGroup.Layer="LayerName" 'This will move the group to that layer. If the layer is visible or not, the group will be.

 

Posted by: Julian Guillo
Post date: 5/10/2009 11:57:01 PM

RE: Show and hide groups

Valued Contributor
Valued Contributor

Thanks for this info. I'll try it out.

 

Posted by: Paul Collins
Post date: 5/11/2009 12:00:17 AM

RE: Show and hide groups

Valued Contributor
Valued Contributor

It worked but I also need to select groups within a group. I've tried playing about with the code but with no luck. Any ideas, please.

 

Posted by: Paul Collins
Post date: 5/12/2009 1:58:46 AM

RE: Show and hide groups

Valued Contributor
Valued Contributor

What do you need to do exactly? I might help, but i would like to have a global idea about your objective...

 

Posted by: Julian Guillo
Post date: 5/13/2009 5:07:28 AM

RE: Show and hide groups

Valued Contributor
Valued Contributor

Julian

I have just managed to sort it out. I was trying to select a group which was nested in another group (child/parent relationship). All it needed was another .Item() after the first one.

Once again, many thanks for your help - it set me on the right path.

 

Posted by: Paul Collins
Post date: 5/13/2009 5:13:45 AM