I'm having a bit of a problem with the following code.
Sub MySub()
On Error Resume Next
If ActiveWindow.Selection.ShapeRange().Name ="Bar" Then
Call MyBarCode(myVarients)
Else If
Call NoBarCode(myVarients)
End If
End Sub.
Basically, If an objected that has been prenamed "Bar" is selected, then it should do something to it, and if it's not selected it does something else. The problem is, when "Bar" isn't selected on the slide, the code is still running MyBarCode bit of the code.



