PC Review


Reply
Thread Tools Rate Thread

Argument not specified

 
 
portroe
Guest
Posts: n/a
 
      8th Dec 2003
anybody have an idea on what i am doing wrong here,

Argument not specified for parameter 'JobTitle' of 'Public Sub
New(JobTitle As String, NumberOfEmployees As Integer)'.

thanks

Portroe

 
Reply With Quote
 
 
 
 
Armin Zingler
Guest
Posts: n/a
 
      8th Dec 2003
"portroe" <(E-Mail Removed)> schrieb
> anybody have an idea on what i am doing wrong here,
>
> Argument not specified for parameter 'JobTitle' of 'Public Sub
> New(JobTitle As String, NumberOfEmployees As Integer)'.


How can we know as you don't tell us how you call the sub?


--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

 
Reply With Quote
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      9th Dec 2003
* portroe <(E-Mail Removed)> scripsit:
> anybody have an idea on what i am doing wrong here,
>
> Argument not specified for parameter 'JobTitle' of 'Public Sub
> New(JobTitle As String, NumberOfEmployees As Integer)'.


Post the code you use to create the new object (the constructor call).

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
 
Reply With Quote
 
portroe
Guest
Posts: n/a
 
      9th Dec 2003
'this is the constructor from the course class,

Public Sub New(ByVal JobTitle As String, ByVal NumberOfEmployees As Integer)
Me.iJobTitle = JobTitle
Me.iNumberOfEmployees = NumberOfEmployees
Me.iFreeOfCharge = ""
End Sub

'thanks



Herfried K. Wagner [MVP] wrote:

> * portroe <(E-Mail Removed)> scripsit:
>
>>anybody have an idea on what i am doing wrong here,
>>
>> Argument not specified for parameter 'JobTitle' of 'Public Sub
>> New(JobTitle As String, NumberOfEmployees As Integer)'.

>
>
> Post the code you use to create the new object (the constructor call).
>


 
Reply With Quote
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      9th Dec 2003
* portroe <(E-Mail Removed)> scripsit:
> 'this is the constructor from the course class,
>
> Public Sub New(ByVal JobTitle As String, ByVal NumberOfEmployees As Integer)
> Me.iJobTitle = JobTitle
> Me.iNumberOfEmployees = NumberOfEmployees
> Me.iFreeOfCharge = ""
> End Sub
>
> 'thanks


And how do you call it? Where does the error occur?

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
 
Reply With Quote
 
portroe
Guest
Posts: n/a
 
      9th Dec 2003
The error occurs when i try to debug, Ireceive this as a build error,

Herfried K. Wagner [MVP] wrote:

> * portroe <(E-Mail Removed)> scripsit:
>
>> 'this is the constructor from the course class,
>>
>>Public Sub New(ByVal JobTitle As String, ByVal NumberOfEmployees As Integer)
>> Me.iJobTitle = JobTitle
>> Me.iNumberOfEmployees = NumberOfEmployees
>> Me.iFreeOfCharge = ""
>> End Sub
>>
>>'thanks

>
>
> And how do you call it? Where does the error occur?
>


 
Reply With Quote
 
Armin Zingler
Guest
Posts: n/a
 
      9th Dec 2003
"portroe" <(E-Mail Removed)> schrieb
> 'this is the constructor from the course class,
>
> Public Sub New(ByVal JobTitle As String, ByVal NumberOfEmployees As
> Integer)
> Me.iJobTitle = JobTitle
> Me.iNumberOfEmployees = NumberOfEmployees
> Me.iFreeOfCharge = ""
> End Sub



The question was how the sub is called, i.e. what is the code to create the
object?


--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

 
Reply With Quote
 
Cor
Guest
Posts: n/a
 
      9th Dec 2003
Hi portroe,

Probably you create the object as this
dim myCourse as New course()
while it has to be
dim myCourse as New course("Programmers",1000)

Just a gues?

Cor


> >> 'this is the constructor from the course class,
> >>
> >>Public Sub New(ByVal JobTitle As String, ByVal NumberOfEmployees As

Integer)
> >> Me.iJobTitle = JobTitle
> >> Me.iNumberOfEmployees = NumberOfEmployees
> >> Me.iFreeOfCharge = ""
> >> End Sub
> >>
> >>'thanks



 
Reply With Quote
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      9th Dec 2003
* portroe <(E-Mail Removed)> scripsit:
> The error occurs when i try to debug, Ireceive this as a build error,


Post the line where the error occurs (must be something like '... New
SomeType(...)'. Maybe you are missing to specify a parameter value or
you are passing wring data.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
 
Reply With Quote
 
portroe
Guest
Posts: n/a
 
      9th Dec 2003
the error occurs in the following line

Dim MyCourse As New Course()

thanks


Herfried K. Wagner [MVP] wrote:

> * portroe <(E-Mail Removed)> scripsit:
>
>>The error occurs when i try to debug, Ireceive this as a build error,

>
>
> Post the line where the error occurs (must be something like '... New
> SomeType(...)'. Maybe you are missing to specify a parameter value or
> you are passing wring data.
>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Throwing Argument exception when method argument is a Guid Andy B Microsoft VB .NET 2 11th Jan 2009 06:38 PM
Argument () Klatuu Microsoft Access Form Coding 4 17th Feb 2008 03:29 PM
what is an argument? =?Utf-8?B?bWNvY2tyZWw=?= Microsoft Excel Misc 7 17th Mar 2006 03:21 PM
Function (array argument, range argument, string argument) vba Witek Microsoft Excel Programming 3 24th Apr 2005 03:12 PM
How to overcome the limitation: Cannot pass 'argument' as ref or out, because ' argument ' is a marshal-by-reference class Mountain Bikn' Guy Microsoft C# .NET 2 15th Nov 2003 07:45 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:23 PM.