VB Argument not optional" function return"
I have application where I need to a put a function in my class that should returns an object of type card. Am trying to develop an application but when I try to run in VB It complains with the following message:
"Only public user-defined types defined in public object modules can be used as parameters or return types for public procedures of class modules or as fields of public user defined types."
What does this error message is showing on my VB project. This is the first time I am trying this kind of Project on my own. Does anyone before come across this kind of error message.
Re: VB Argument not optional" function return"
Add a regular module to your VB/VBA project, Despite (or, perhaps, in virtue of) its simplicity, diagnostic output remains a useful debugging tool. In languages such as Perl this was, for a while, the only debugging tool. Copy and paste the code in this article into the module, Call the functions from other Functions or Subs in your code, or if you are adding these functions to an Excel function, use the functions in worksheet array formulas.
Re: VB Argument not optional" function return"
By default these are modal, i.e. they interrupt the execution of the program. Message boxes also require the programmer to press the "OK" button, which can seriously slow down debugging. I tried using =CountByColorIF(Range("C14:C1399"), -4105, True) but I have not gotten it to work. I no longer get an error message in the VB code when the formula calcuates but the formula returns #VALUE!. VBA Editor has a fully functional integrated debugger, yet it does not obviate the need for diagnostic output.
Re: VB Argument not optional" function return"
Hiding the VBE Editor via Application.VBE.MainWindow.Visible may improve the performance in some cases. On the two worksheets, change the values in the parameter cells at the top of the worksheets, and see how the amortization schedules adjust. presumably the range that contains cells that we want to sum. Every argument has a data type (this one is Range) and the function itself has a data type. Setting Application. Calculation controls the recalculation of the cells while executing code. Setting it to false should speed up the execution of the code that changes the cell values.