S
scattered
Greetings,
I have a program that (as part of an animation involving vectors in a
plane) creates then deletes a large number of arrows on a chart. It
works fine, but when I click on one of the arrows I see that its name
is something like "Line 5265" even though there are only 2 vectors
actually in existence (so that myChart.Shapes.Count correctly gives
2). It seems weird that the Count property is reset upon delete but
that there is some behind-the-scenes counter which isn't reset. This
isn't pressing since I don't use the name in my code (and know how to
change it if I needed to - which, by the way, doesn't reset this
hidden counter either) but have a concern that maybe the code will
crash after 65536 lines have been created (and mostly deleted) since
for all I know there is a 16-bit int counter in the code for Excel
which will trigger a bug upon overflow. Is there any way to reset the
numbering so that the default numbering of a new shape only depends on
the current count? Also- is there anything behind my fear that
eventually such large numbers in the shape name might lead to a
harmful overflow? Just curious.
-scattered
I have a program that (as part of an animation involving vectors in a
plane) creates then deletes a large number of arrows on a chart. It
works fine, but when I click on one of the arrows I see that its name
is something like "Line 5265" even though there are only 2 vectors
actually in existence (so that myChart.Shapes.Count correctly gives
2). It seems weird that the Count property is reset upon delete but
that there is some behind-the-scenes counter which isn't reset. This
isn't pressing since I don't use the name in my code (and know how to
change it if I needed to - which, by the way, doesn't reset this
hidden counter either) but have a concern that maybe the code will
crash after 65536 lines have been created (and mostly deleted) since
for all I know there is a 16-bit int counter in the code for Excel
which will trigger a bug upon overflow. Is there any way to reset the
numbering so that the default numbering of a new shape only depends on
the current count? Also- is there anything behind my fear that
eventually such large numbers in the shape name might lead to a
harmful overflow? Just curious.
-scattered