Click here to Skip to main content
16,005,552 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: login form concept Pin
Dave Sexton11-Oct-06 21:18
Dave Sexton11-Oct-06 21:18 
QuestionQuestion about CSV file [modified] Pin
TeiUKei11-Oct-06 18:22
TeiUKei11-Oct-06 18:22 
AnswerRe: Question about CSV file Pin
Dave Sexton11-Oct-06 21:01
Dave Sexton11-Oct-06 21:01 
GeneralRe: Question about CSV file Pin
TeiUKei11-Oct-06 21:51
TeiUKei11-Oct-06 21:51 
GeneralRe: Question about CSV file Pin
Dave Kreskowiak12-Oct-06 3:07
mveDave Kreskowiak12-Oct-06 3:07 
GeneralRe: Question about CSV file Pin
TeiUKei12-Oct-06 14:17
TeiUKei12-Oct-06 14:17 
GeneralRe: Question about CSV file Pin
Dave Kreskowiak12-Oct-06 16:04
mveDave Kreskowiak12-Oct-06 16:04 
GeneralRe: Question about CSV file Pin
TeiUKei12-Oct-06 16:35
TeiUKei12-Oct-06 16:35 
Well, this is the actual code i am doing. I still can't find where the problem is although i use Environment.Newline, sorry for the troublesome!

This is the data i try to displayed

Dim Data1 As New PropertyCreateFile
Dim aa As New ArrayList
aa.Add("A4585525581")
aa.Add("b")
aa.Add("b2")
aa.Add("c234")
aa.Add("M45686")
Data1.Data = aa
Data1.Counter = 3

'aaa.CreateTextFile(Data1)
aaa.CreateCSVFile(Data1)

Public Function CreateCSVFile(ByVal CreatePP As PropertyCreateFile) As String

Dim sFilename As String = (CurDir & "/CSVFile.csv")
Dim b As Integer
Dim a As Integer
Dim c As String
Dim Data(4) As String

FileOpen(20, sFilename, OpenMode.Output)

For b = 0 To CreatePP.Counter - 1

For a = 0 To 4
c = CStr(CreatePP.Data(a))

'For these if statement, i intend to get and check the
'length of data pass in by user, so the data can displayed
'systematically
If c.Length <= 1 Then
c = c.PadRight(2, CChar(" "))
ElseIf c.Length <= 2 Then
c = c.PadRight(3, CChar(" "))
ElseIf c.Length > 2 And c.Length <= 4 Then
c = c.PadRight(5, CChar(" "))
ElseIf c.Length > 4 And c.Length <= 6 Then
c = c.PadRight(7, CChar(" "))
ElseIf c.Length > 6 And c.Length <= 11 Then
c = c.PadRight(12, CChar(" "))

End If

Data(a) = c

'Is it right if i use Environment.NewLine here?
Write(20, Data(a), Environment.NewLine)

Next a


Next b

FileClose(20)
GeneralRe: Question about CSV file Pin
Dave Kreskowiak13-Oct-06 1:54
mveDave Kreskowiak13-Oct-06 1:54 
GeneralRe: Question about CSV file Pin
TeiUKei14-Oct-06 14:47
TeiUKei14-Oct-06 14:47 
GeneralRe: Question about CSV file Pin
Dave Kreskowiak15-Oct-06 3:39
mveDave Kreskowiak15-Oct-06 3:39 
Questioncystal reports deployment using typed datasets Pin
steve_rm11-Oct-06 18:04
steve_rm11-Oct-06 18:04 
AnswerRe: error on store procedure link to vb Pin
Dave Kreskowiak12-Oct-06 3:06
mveDave Kreskowiak12-Oct-06 3:06 
QuestionWhich is better? Pin
UltraCoder11-Oct-06 14:06
UltraCoder11-Oct-06 14:06 
AnswerRe: Which is better? Pin
Ray Cassick11-Oct-06 18:22
Ray Cassick11-Oct-06 18:22 
GeneralRe: Which is better? Pin
UltraCoder11-Oct-06 18:51
UltraCoder11-Oct-06 18:51 
QuestionChanging The Screensaver Through The Registry Pin
UltraCoder11-Oct-06 14:01
UltraCoder11-Oct-06 14:01 
AnswerRe: Changing The Screensaver Through The Registry Pin
Dave Kreskowiak12-Oct-06 1:50
mveDave Kreskowiak12-Oct-06 1:50 
GeneralRe: Changing The Screensaver Through The Registry Pin
UltraCoder12-Oct-06 7:51
UltraCoder12-Oct-06 7:51 
QuestionData adapter configuration wizard problem Pin
penguin500011-Oct-06 11:28
penguin500011-Oct-06 11:28 
AnswerRe: Data adapter configuration wizard problem Pin
Dave Sexton11-Oct-06 20:54
Dave Sexton11-Oct-06 20:54 
GeneralRe: Data adapter configuration wizard problem Pin
penguin500012-Oct-06 9:44
penguin500012-Oct-06 9:44 
QuestionFile Indexing Pin
UltraCoder11-Oct-06 11:19
UltraCoder11-Oct-06 11:19 
AnswerRe: File Indexing Pin
Dave Kreskowiak11-Oct-06 11:43
mveDave Kreskowiak11-Oct-06 11:43 
GeneralRe: File Indexing Pin
UltraCoder11-Oct-06 12:20
UltraCoder11-Oct-06 12:20 

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.