Click here to Skip to main content
15,912,837 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Array problem Pin
Dave Kreskowiak9-Dec-04 3:24
mveDave Kreskowiak9-Dec-04 3:24 
Uhhh... Why are you passing the LineOut array to the AddError function and AT THE SAME TIME using it to store a return from the very same function? You're AddError function should not be returning data to the same variable using two different methods at the same time.

I have no idea what your trying to do here, but this is approximately what your AddError might look like:
Friend Function LineCheck(ByVal LineIn As Line) As Line()
   Dim LineOut() As Line
   If LineIn.Field1 = "" Then AddError(LineIn, "Field1 Blank", LineOut)
   If LineIn.Field2 = "" Then AddError(LineIn, "Field2 Blank", LineOut)
   If LineIn.Field3 = "" Then AddError(LineIn, "Field3 Blank", LineOut)
   If LineIn.Field4 = "" Then AddError(LineIn, "Field4 Blank", LineOut)
   Return LineOut
End Function

Friend Sub AddError(ByVal LineIn As Line, ByVal LineError As String, ByRef LineOut() As Line)
   Dim tmp As New Line
   tmp = LineIn
   tmp.LineError = LineError
   If Not LineOut Is Nothing Then ReDim Preserve LineOut(LineOut.Length) Else ReDim Preserve LineOut(0)
   LineOut(LineOut.Length - 1) = New Line
   LineOut(LineOut.Length - 1) = tmp
End Sub



RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

GeneralConverting hex data to ascii using vb.net Pin
Member 15285688-Dec-04 11:03
Member 15285688-Dec-04 11:03 
GeneralRe: Converting hex data to ascii using vb.net Pin
Dave Kreskowiak9-Dec-04 0:55
mveDave Kreskowiak9-Dec-04 0:55 
Generaldb grid col width Pin
Paps28-Dec-04 10:08
Paps28-Dec-04 10:08 
GeneralRe: db grid col width Pin
Jim Matthews8-Dec-04 10:36
Jim Matthews8-Dec-04 10:36 
GeneralRe: db grid col width Pin
Paps28-Dec-04 10:54
Paps28-Dec-04 10:54 
GeneralRe: db grid col width Pin
Paps28-Dec-04 11:05
Paps28-Dec-04 11:05 
GeneralRe: db grid col width Pin
Jim Matthews9-Dec-04 2:48
Jim Matthews9-Dec-04 2:48 
GeneralRe: db grid col width Pin
Jim Matthews9-Dec-04 8:25
Jim Matthews9-Dec-04 8:25 
QuestionReturn value from modal dialog? Pin
TAlvord8-Dec-04 10:03
TAlvord8-Dec-04 10:03 
AnswerRe: Return value from modal dialog? Pin
TAlvord10-Dec-04 9:57
TAlvord10-Dec-04 9:57 
Generalpassing variables between windows forms Pin
mpiotro8-Dec-04 8:51
mpiotro8-Dec-04 8:51 
GeneralRe: passing variables between windows forms Pin
Pablo.ar8-Dec-04 9:04
Pablo.ar8-Dec-04 9:04 
GeneralRe: passing variables between windows forms Pin
mpiotro8-Dec-04 9:14
mpiotro8-Dec-04 9:14 
GeneralRe: passing variables between windows forms Pin
Dave Kreskowiak8-Dec-04 10:28
mveDave Kreskowiak8-Dec-04 10:28 
GeneralRe: passing variables between windows forms Pin
Jim Matthews8-Dec-04 10:14
Jim Matthews8-Dec-04 10:14 
GeneralRe: passing variables between windows forms Pin
Pablo.ar8-Dec-04 14:20
Pablo.ar8-Dec-04 14:20 
GeneralRe: passing variables between windows forms Pin
Jim Matthews9-Dec-04 2:53
Jim Matthews9-Dec-04 2:53 
Generaldetecting/removing shared folders Pin
tutank738-Dec-04 7:52
tutank738-Dec-04 7:52 
GeneralPlace pictures in listview items (bigger than LargeIcons) Pin
evermood8-Dec-04 6:50
evermood8-Dec-04 6:50 
GeneralI am in Very bad position please Help (Runtime Error 430) Pin
sathiyaram8-Dec-04 6:43
sathiyaram8-Dec-04 6:43 
GeneralRe: I am in Very bad position please Help (Runtime Error 430) Pin
Peter938-Dec-04 7:04
Peter938-Dec-04 7:04 
GeneralRe: I am in Very bad position please Help (Runtime Error 430) Pin
sathiyaram8-Dec-04 20:36
sathiyaram8-Dec-04 20:36 
GeneralRe: I am in Very bad position please Help (Runtime Error 430) Pin
Peter939-Dec-04 6:36
Peter939-Dec-04 6:36 
GeneralRe: I am in Very bad position please Help (Runtime Error 430) Pin
Mekong River8-Dec-04 23:24
Mekong River8-Dec-04 23:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.