title: Check if ActiveX label contains part of string
body: <p>I am using this code to hide a label based on if it contains % sign only and nothing else. </p>
  
  <p>It is this part of the code it is erroring now when running. Error: "OLEFormat.Object: Invalid Request. Command cannot be applied to a shape range with multiple shapes"</p>
  
  <p>What should be the correct code?</p>
  
  <pre><code>If InStr(1, myRange.OLEFormat.Object.Caption, "%", vbTextCompare) &gt; 0 Then
  </code></pre>
  
  <hr>
  
  <pre><code>Sub c_Three_RemovePercent()
  
  For slideNumber = 1 To 11
  
  Set mydocument = ActivePresentation.Slides(slideNumber)
  mydocument.Select
  
  Dim myArray() As Variant
  Dim myRange As Object
  myArray = Array("Lbl_V1", "Lbl_V2", "Lbl_V3", "Lbl_V4", "Lbl_V5")
  Set myRange = ActivePresentation.Slides(1).Shapes.Range(myArray)
  
  
  
  With mydocument.Shapes.Range(myArray)
  
  
   If InStr(1, myRange.OLEFormat.Object.Caption, "%", vbTextCompare) &gt; 0 Then
      mydocument.Shapes(myRange).Visible = False
         Else: mydocument.Shapes(myRange).Visible = True
     End If
  
  
    End With
  
  
      Next slideNumber
  End Sub
  </code></pre>