Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
How to solve this problem in VS 2012
VB
Error	1	Overload resolution failed because no accessible 'New' accepts this number of arguments.	C:\Users\DEV\Desktop\WindowsApplication1\WindowsApplication1\Form1.vb	27	13	WindowsApplication1
Posted
Comments
Richard MacCutchan 3-Nov-13 11:14am    
Show the line(s) of code that generate the error.

1 solution

Look at the error message: is specifies the line causing the problem: line number 27 in your code file "Form1.vb".

Whatever you are doing there, you are trying to create an instance of an object, but there is no class constructor that takes that number of parameters.
It may be that you are writing:
VB
Dim str as New String
(String does not have a constructor that takes no arguments)
Or
VB
Dim myVar as new MyClass(oneParam, twoParam)
where MyClass does not have a constructor that has two parameters.

Look at line 27, see what you are trying to create, and then inspect it's valid constructors.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900