Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



VB Argument not optional" function return"

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 18-08-2009
Member
 
Join Date: Feb 2009
Posts: 66
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.

Reply With Quote
  #2  
Old 18-08-2009
Member
 
Join Date: Jan 2009
Posts: 143
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.
Reply With Quote
  #3  
Old 18-08-2009
Member
 
Join Date: Dec 2008
Posts: 183
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.
Reply With Quote
  #4  
Old 18-08-2009
Member
 
Join Date: Mar 2008
Posts: 258
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.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "VB Argument not optional" function return""
Thread Thread Starter Forum Replies Last Post
Toshiba X505 Q860 getting an error message "A problem with the cooling system, return it for service" Wild Kat Portable Devices 7 18-02-2012 03:19 PM
Error code 80072EE5, Windows Update fails on "Optional" items Raveroy Operating Systems 3 06-03-2011 06:26 AM
Error for wireless request "Set Mode" (8B06) : invalid argument "roaming" WinSlayer Operating Systems 3 30-07-2009 08:40 PM
Can't get DOS "for" loop to return full filenames with spaces hatred Windows XP Support 3 02-06-2009 11:09 AM
Uninstall "Microsoft Update" and return to "Windows Update" jabarnut Windows Update 14 13-07-2005 08:28 AM


All times are GMT +5.5. The time now is 12:50 PM.