maryam
05-18-2007, 11:32 PM
method 'ungroup' of object 'ShapeRange' fail
I get this error. This may be an automation error.
there is a sheet on which I put the shapes (Stream and unit shapes). I have an object pallet to bring the shapes and each shape has a textbox which shows its name. In my coding I have the codes like the following to group/ungroup the shape and its textbox when necessaryand Select or delete the shapes.
Sheets("sheet1").Shapes(Stream).Select
Selection.ShapeRange.Ungroup.Select
selection.shaperange.group.select
sheets("sheet1").shapes().delete
NOw when I am trying to run, I get this error and after that if I end error message box and do again, there will be no error but some of the shapes will be deleted!
Previosely my program was running and I didnt change anything, but I dont understand why it doesnt work now.:banghead:
:help :help :help :help :help :help :help :help :help :help :help :help :help :help :help
I get this error. This may be an automation error.
there is a sheet on which I put the shapes (Stream and unit shapes). I have an object pallet to bring the shapes and each shape has a textbox which shows its name. In my coding I have the codes like the following to group/ungroup the shape and its textbox when necessaryand Select or delete the shapes.
Sheets("sheet1").Shapes(Stream).Select
Selection.ShapeRange.Ungroup.Select
selection.shaperange.group.select
sheets("sheet1").shapes().delete
NOw when I am trying to run, I get this error and after that if I end error message box and do again, there will be no error but some of the shapes will be deleted!
Previosely my program was running and I didnt change anything, but I dont understand why it doesnt work now.:banghead:
:help :help :help :help :help :help :help :help :help :help :help :help :help :help :help