try to create the object.. if it gives you an error then an object exists in that location.
you would use "On Error Resume Next" and "On Error Goto 0".
You can also simply access the object instead of attempting to create it. The same approach can be used for both.Code:On Error Resume Next Load ArrayCtl(23) If (Err.Number <> 0) Then 'Clear the error Err.Clear Resume 'Do what ever you would want if the object did not exist ... ... Else 'Do what ever you would want if the object did exist ... ... End If On Error Goto 0




Reply With Quote