DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Value from a function into a sub class

Hello,

 

I Have a value from a function which I want into a Sub class.

 

Note: Text BlaBla are instead for program text)

 

Function yellow

Text blabla

Text Blabla

 strSessionCar=4  

End Function

 

 

Sub apple

Text Blabla

 strSessionCar=4  (here i want to have the value from the "Function yellow")

End Sub

 

/

Thanks

 

 

 

 

0 Kudos
Message 1 of 2
(5,563 Views)

Hi LVdummies,

 

Is this what you mean?  You assign the return parameter of a Function by using the Function name like it's a variable:

 

Call Apple() 
 
Sub Apple
  Dim strSessionCar
  strSessionCar = Yellow("")
  MsgBox strSessionCar
End Sub

Function Yellow(Parameter1)
  Dim TextResponse
  TextResponse = InputBox("Enter Blabla Text")
Yellow = TextResponse
End Function

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 2 of 2
(5,542 Views)