Checking if an object variable is set

  • Thread starter David C. Holley
  • Start date
D

David C. Holley

Is there a way to test if an object variable is set? I have a SET
statement in an For Each loop and would like to check if the object
variable is SET

For Each node In tvTargetControl.Nodes
If node.Key = "06ACT:printPurchaseOrder" Then
Set targetNode = node
Debug.Print "nodes exist"
Else
Debug.Print node.Key
End If
Next
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top