Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

Excel VBA, C-API Problem with DAQmxLoadTask

Hello,

 

ich have a problem using the DAQmxLoadTask funktion. I have a task which I created in the NI-MAX. The device is connected and I can execute the task in the NI-MAX.

 

Now I'm trying to access that task from Excel via VBA. I've set the reference to the NI C-API

 

but the following code always produces the error -200089, which means "Task name specified conflicts with an existing task name."

 

Public Function LoadTask() As Long

Dim taskHandle As Long
Dim error As Long

Dim taskName As String
taskName = "Durell"

error = DAQmxLoadTask(taskName, taskHandle)

End Function

 

What am I doining wrong?

 

With kind regards,

 

Alex

0 Kudos
Message 1 of 1
(2,890 Views)