BRS0903
Member
- Joined
- Jun 12, 2006
- Messages
- 11
- Programming Experience
- 3-5
I am writing a program that I picked up from somebody else and I have a couple of questions. I run the program and when I try to execute it I am hit with an error that tells me in this Sub that the Object Reference is not set to an instance of an object. The tips it gives me are the following...
Use the "new" keyword to create an object instance.
Check to determine if the object is null before calling the method.
Get general help for this exception.
It points to the line that I have bolded below. Somebody help please!
Sub MoveIt(ByVal inpStartLoc As Integer, ByVal outLength As Integer, ByRef buildString As String)
Dim intFrom As Integer = inpStartLoc - 1
Dim intTo As Integer = intFrom + outLength - 1
For k As Integer = intFrom To intTo
buildString &= strInput(k)
Next
End Sub
Use the "new" keyword to create an object instance.
Check to determine if the object is null before calling the method.
Get general help for this exception.
It points to the line that I have bolded below. Somebody help please!
Sub MoveIt(ByVal inpStartLoc As Integer, ByVal outLength As Integer, ByRef buildString As String)
Dim intFrom As Integer = inpStartLoc - 1
Dim intTo As Integer = intFrom + outLength - 1
For k As Integer = intFrom To intTo
buildString &= strInput(k)
Next
End Sub