Why does a Shape Object still exist after it has been deleted?
When I check the Shape Object it is not Nothing and therefore still exists even though the shape is visually deleted from the worksheet.
Sub Delete_shpObj_and_Check_if_Still_Exists()
Dim ShpObj As Shape
Set ShpObj = Sheet1.Shapes("Oval 1")
'check if shape object exists
If Not ShpObj Is Nothing Then
MsgBox "Shape Object exists"
Else
MsgBox "Shape Object doesn't exist"
End If
'Delete the Shape Object
ShpObj.Delete
'Test again if shape object exists
If Not ShpObj Is Nothing Then
MsgBox "Shape Object exists"
Else
MsgBox "Shape Object doesn't exist"
End If
End Sub