kelly mort
Well-known Member
- Joined
- Apr 10, 2017
- Messages
- 2,169
- Office Version
- 2016
- Platform
- Windows
I am using this code to create a shape on a sheet defined here as sh.
There is no problem with the above line for now since I don’t get any errors.
Then I wanted to manipulate the shape so I did:
And if the sh is not the active sheet, I get an error message object doesn’t support this………….
How do I fix that please?
Because I get same error on this block too when I comment out the previous line:
Code:
sh.Shapes.AddShape(msoShapeRectangle, 10, 15, 650, 800).Select
There is no problem with the above line for now since I don’t get any errors.
Then I wanted to manipulate the shape so I did:
Code:
Selection.ShapeRange.Line.Visible = msoFalse
And if the sh is not the active sheet, I get an error message object doesn’t support this………….
How do I fix that please?
Because I get same error on this block too when I comment out the previous line:
Code:
With Selection.ShapeRange.Fill
End With