I'm trying to use the following line to see if 'Label20' exists but I get the error: 'Wrong number of arguments or invalid property assignment'
Any help with correcting the syntax is appreciated.
Code:
Dim OleObj As Object
Dim Ws As Worksheet
Set Ws = Worksheets("Sheet1")
For Each OleObj In Ws.OLEObjects
If Not OleObj.Object("Label20") Is Nothing Then
'Do something
EndIf
Next
Any help with correcting the syntax is appreciated.