Hi,
Is it possible to create a description of an object via a function from the function library? I'm trying to get this code to work properly, but I keep getting the error: "Wrong number of arguments or invalid property assignment." The description of the objTextbox is created when I call the function, but it returns back to the action as Empty. Can anyone help?
This is the code from the action, Flight_NewSale:
And then here's the code from the Function Library:
Is it possible to create a description of an object via a function from the function library? I'm trying to get this code to work properly, but I keep getting the error: "Wrong number of arguments or invalid property assignment." The description of the objTextbox is created when I call the function, but it returns back to the action as Empty. Can anyone help?
This is the code from the action, Flight_NewSale:
Code:
Public objTextbox
' Create the instances of the objects in the form
txtName = createTextbox("attached name", "Arrival Time:")
And then here's the code from the Function Library:
Code:
Public Function createTextbox(nameProperty, valProperty)
On Error Resume Next
' Create a textbox object
Set objTextbox = Description.Create()
objTextbox("Class Name").Value = "WinEdit"
objTextbox(nameProperty).Value = valProperty
' Return the object
createTextbox = objTextbox ' object is created but is returned as Empty
If Err <> 0 Then
msgbox Err.Description
End If
End Function