Shape handles don't release after grouping some lines

M

MathTeacher

using Word 2000 on Vista;
Within VBA I plot a function by creating many (about 200) very short
straight lines to simulate the curved graph. I group the lines, then show
another userform, but the shape handles are still on all the short lines. If
I close the userform the handles disappear (and the lines are grouped), but I
need the handles to disappear with the userform still on the screen.

Here's the significant code. The ArrayOfLines contains all the names of the
individual lines:

ActiveDocument.Shapes.Range(ArrayOfLines).Select
GraphGroup = Selection.ShapeRange.Group.name
 
M

MathTeacher

Thanks for the suggestion, but I have already tried that. I should have told
you that in my first posting.

I have managed to get the handles to release, but in a brute force way, by
selecting another shape already on the document.

ActiveDocument.Shapes.Range(GridGroup).Select 'try to get the shape handles
to release
Selection.Collapse

This has been working consistently, but it sure doesn't seem very elegant,
and if I need to release the handles but don't have another shape to select,
I'm afraid I might be dead in the water.

I'd still like to find a better way to release those shape handles.

macropod said:
Hi MathTeacher,

Have you tried collapsing the selection?

--
Cheers
macropod
[Microsoft MVP - Word]


MathTeacher said:
using Word 2000 on Vista;
Within VBA I plot a function by creating many (about 200) very short
straight lines to simulate the curved graph. I group the lines, then show
another userform, but the shape handles are still on all the short lines. If
I close the userform the handles disappear (and the lines are grouped), but I
need the handles to disappear with the userform still on the screen.

Here's the significant code. The ArrayOfLines contains all the names of the
individual lines:

ActiveDocument.Shapes.Range(ArrayOfLines).Select
GraphGroup = Selection.ShapeRange.Group.name
.
 
M

MathTeacher

Oops! I just doublechecked and found that the code that selects another
shape in an effort to release the shape handles does NOT seem to be working
tonight. I don't know what's different. I also tried nudging the grouped
shape up and down with ".IncrementTop" but still with no success.

Once the sub that creates the grouped lines finishes, my userform has a
command button that calls a sub to "nudge" all the shapes up by a few pixels
using .IncrementTop -- when I do this, the handles disappear. If I make a
call to the sub that does the increment from WITHIN the sub that creates the
grouped lines, however, the handles don't disappear. The nudge up only works
after I have finished the sub doing the creating.

Maybe you have another suggestion, but in the meantime I'm going to strip
down the code to some bare basics to see if I can get a better "handle" on
this problem.
MathTeacher said:
Thanks for the suggestion, but I have already tried that. I should have told
you that in my first posting.

I have managed to get the handles to release, but in a brute force way, by
selecting another shape already on the document.

ActiveDocument.Shapes.Range(GridGroup).Select 'try to get the shape handles
to release
Selection.Collapse

This has been working consistently, but it sure doesn't seem very elegant,
and if I need to release the handles but don't have another shape to select,
I'm afraid I might be dead in the water.

I'd still like to find a better way to release those shape handles.

macropod said:
Hi MathTeacher,

Have you tried collapsing the selection?

--
Cheers
macropod
[Microsoft MVP - Word]


MathTeacher said:
using Word 2000 on Vista;
Within VBA I plot a function by creating many (about 200) very short
straight lines to simulate the curved graph. I group the lines, then show
another userform, but the shape handles are still on all the short lines. If
I close the userform the handles disappear (and the lines are grouped), but I
need the handles to disappear with the userform still on the screen.

Here's the significant code. The ArrayOfLines contains all the names of the
individual lines:

ActiveDocument.Shapes.Range(ArrayOfLines).Select
GraphGroup = Selection.ShapeRange.Group.name
.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top