sls
08-01-2007, 08:41 AM
hallo,
In my worksheet, there are some pictures that I want to delete automatically.
But my problem is that the number of picture can be different every time in my worksheet, and the name of the pictures changes also, how can I solve this problem??
Example:
ActiveSheet.Shapes("Picture 21").Select
ActiveSheet.Shapes.Range(Array("Picture 21", "Picture 22")).Select
ActiveSheet.Shapes.Range(Array("Picture 21", "Picture 22", "Picture 23")). _
Select
Selection.Delete
The next time:
ActiveSheet.Shapes("Picture 24").Select
ActiveSheet.Shapes.Range(Array("Picture 24", "Picture 25")).Select
Selection.Delete
The problem is that you never know how many pictures there are in the worksheet.
With friendly greetings
sls
In my worksheet, there are some pictures that I want to delete automatically.
But my problem is that the number of picture can be different every time in my worksheet, and the name of the pictures changes also, how can I solve this problem??
Example:
ActiveSheet.Shapes("Picture 21").Select
ActiveSheet.Shapes.Range(Array("Picture 21", "Picture 22")).Select
ActiveSheet.Shapes.Range(Array("Picture 21", "Picture 22", "Picture 23")). _
Select
Selection.Delete
The next time:
ActiveSheet.Shapes("Picture 24").Select
ActiveSheet.Shapes.Range(Array("Picture 24", "Picture 25")).Select
Selection.Delete
The problem is that you never know how many pictures there are in the worksheet.
With friendly greetings
sls