I did a quick test of your code and it did not generate any errors; however,
that may be because you have other objects that are affecting the code in
some way. However, I do note that you have InitialShape declared as a
Boolean and are using it as the assignment value to the Replace argument of
the shape's Select method... the help files say that the Replace object
takes an Object, not a Boolean, so that may have something to do with your
problem (I have not used the Replace argument with a shape's Select method
before, so I'm not entirely clear what is supposed to be replaced here). I
also note that your Error Handler simply executes an Exit Sub statement...
given that, you don't really need it... jumping to the error handler's label
will execute the following statement so if there is nothing following that
label, the End Sub is executed and the macro ends at that point.