|
-
Nov 22nd, 2003, 05:04 PM
#1
Thread Starter
Junior Member
What is wrong with this code ?
Hi there, VB.NET
I need to write to a text file the values, instead it writes the string
FileOpen(1, "d:\orders\orders.txt", OpenMode.Output)
If LCase(Trim(MyArray(J, 45))) = "yes" Then
OutLine = "TAB(2)," & " Trim(MyArray(J, 38)), "
End If
If LCase(Trim(MyArray(J, 37))) = "new" Then
OutLine = OutLine & " TAB(51), " & " NONE "
Else
OutLine = OutLine & "TAB(51)," & " Trim(MyArray(J, 25)), "
End If
PrintLine(1, OutLine)
orders.txt TAB(2), Trim(MyArray(J, 38)), TAB(51), NONE
-
Nov 27th, 2003, 02:20 AM
#2
Junior Member
Try This
VB Code:
If LCase(Trim(MyArray(J, 45))) = "yes" Then
OutLine = TAB(2) & "," & Trim(MyArray(J, 38)) & ", "
End If
If LCase(Trim(MyArray(J, 37))) = "new" Then
OutLine = OutLine & TAB(51) & ", " & " NONE "
Else
OutLine = OutLine & TAB(51) & "," & Trim(MyArray(J, 25)) & ", "
End If
-
Nov 27th, 2003, 07:02 AM
#3
Hyperactive Member
the problem lies here
"TAB(2)," & " Trim(MyArray(J, 38)), "
it should be like TAB(2) & "," & Trim(MyArray(J, 38)) & ","
-
Nov 30th, 2003, 12:40 PM
#4
Thread Starter
Junior Member
Well my guess is that the TAB(2) function is only recognized within the Print or PrintLine functions. It probably may be a work around this, but I have not figure it out yet.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|