Hi,
Welcome to the wacky world of shapes. You may not need the 'Named Ranges' for your pictures. Although Excel allows duplicate 'Shape Names' on a sheet, it is something I try to avoid. When I create new shapes I either number them sequentially or name them according to some algorithm (e.g. 'myShapeC10' for a shape anchored to cell 'C10').
Attached are a few Shape Utility functions that should help you now and in the future. All were tested successfully with your worksheet:
a. GetActiveShapeAttributes() - Gets the name, coordinates and other attributes associated with a Shape.
b. RenameActiveShape() - Renames a Shape.
c. LoopThroughShapes() - Gets attributes for all Shapes on the Active Sheet. The output is put on Sheet 'Log' (which is created if it doesn't already exist.
d. DeleteAllShapesOnActiveSheet() - Deletes all Shapes on the Active Sheet (including Charts). Comments attached to cells are NOT DELETED.
e. DeleteSpecialShapesOnActiveSheet() - Deletes all Shapes on the Active Sheet that start with a SPECIAL naming convention.
f. CopyShapesToNewSheet() - Example of how to copy Shapes (adapted from your Deal() macro)
Here are a couple of other comments about your code which may help you in the future:
a. I noticed you didn't use 'Option Explicit' at the top of your module. To prevent typos from ruining days and weeks of work 'Option Explicit' is NEEDED at the top of each code module. This prevents errors caused by missspellings and FORCES every variable to be DECLARED (e.g. dim i as Integer). http://www.cpearson.com/excel/DeclaringVariables.aspx
b. When declaring global variables you should probably identify them as being global .e.g.
That way you know to look at the top of a module to find it's definition. To the best of my knowledge the KEYWORD 'Global' is archaic and is only present for backward compatibility. You should probably replace it with 'Public'.
Lewis
------------------
Code follows (ordinary Module code such as 'Module1'):
Bookmarks