Professional OPC
Development Tools

logos

BrowseBranches()

More
02 Mar 2017 10:53 - 02 Mar 2017 10:54 #4980 by support
Replied by support on topic BrowseBranches()
Hello and welcome.

I am not sure why the error actually says "Argument not optional", but I can see that the code isn't quite right. The error actually does not have anything to do with the BrowseBranches method - it has to do with the Add method.

This works:

    Dim client As New EasyDAClient
    Dim collection As DANodeElementCollection
 
    Set collection = client.BrowseBranches("localhost", "OPCLabs.KitServer.2", "SimulateEvents")
The Add method can add one element to the collection - but not one collection to the other, which is what your code attempts to do.

Best regards
Last edit: 02 Mar 2017 10:54 by support.

Please Log in or Create an account to join the conversation.

More
02 Mar 2017 10:14 #4979 by Wolf
BrowseBranches() was created by Wolf
I cannot get the BrowseBranches Function to work:

I am using VBA in Excel, but i think i am doing something fundamentally wrong..

Dim client As New EasyDAClient
Dim collection As New DANodeElementCollection
 
collection.Add (client.BrowseBranches("localhost", "OPCLabs.KitServer.2", "SimulateEvents"))

When trying to run this i get "Compile error: Argument not optional" with .BrowseBranches being highlighted.

Can you help a novice? :)

Please Log in or Create an account to join the conversation.

Moderators: support
Time to create page: 0.175 seconds

      

 Recommend this on Google