I am trying to select a shape by name using VBA. In my sheet, I have 10 shapes named 1 to 10 and want a specific one. For some reason, the shape that excel selects with my code does not seem to be the shape with the name I told it to select. As far as I can tell, the shape that it chooses is random. Here is my code (The x value is supposed to retrieve a number value that I input from 1 to 10):
Sub FindTheShape()
Sheets("Fleet 1").Select
Dim x As Long
x = ActiveSheet.Range("$A$1000").End(xlUp).Value
ActiveSheet.Shapes(x).Select
End Sub
Please help, any ideas are greatly appreciated.