i want to call a function that is in an ocx the ocx has: Function CustomerMessageBoxList(cve As Integer, cve1 As Integer) As Integer Dim num As Integer num = cve + cve1 CustomerMessageBoxList = num End Function and in navision when i try to execute it, it tells thats theres a problem wih the numbers of arguments
This looks fine… Make sure the function is “Public” so you can see it from Navision. Once registering your OCX in Navision then declare a variable of your OCX say in a codeunit. For this example i have called the OCX variable “test” To call your function all you have to do is… y = test.CustomerMessageBoxList(i,j) Maybe you have forgotten the assignment of “y”? If y,i and j are declared as Integers in Navision then the above should work fine. If you can see your OCX and it’s functions when you press F5 then this is a good sign. If that doesn’t work then unregister and reregister the control… Good luck… Ade [:)]
thanks akers