I have inserted a smart art, and converted it to shapes. And Selected a shape by clicking on it.
Now I want to get Shape object of slected shape. I have tried this but it throws exception.
dim shap as Excel.Shape = ExcelApp.Selection
I can get the shape object by iterating on ActiveSheet.Shapes or like this
dim shap as Excel.Shape = ActiveSheet.Shapes.Item(1)
But how would I know this shape is selected or not, Really need Help Thanks.
Try
Selection.ShapeRangeto get a reference to the shape object.