|
-
October 1st, 2006, 09:52 AM
#1
reading Comma delimited file strings inbetween commas
I have a comma delimited file containing a string
new parameter1, new parameter 2, new parameter 3
I want to read the string inbetween the commas.
In VB 6 the following code worked fine.
Code:
Public Sub fileread()
'Read parameters from PrintFile w/debug print
mpickedfilename = App.Path + "\Parameters.txt"
Open mpickedfilename For Input As #20
'get parameters count from printFile
mparametercount = 0
Do While Not EOF(20)
Input #20, mfileparameter 'count array for redim
mparametercount = mparametercount + 1
Loop
Close #20
ReDim mparameter(mparametercount)
'Get parameters form printFile
mpickedfilename = App.Path + "\Parameters.txt"
Open mpickedfilename For Input As #26
mparametercount = 0
Do While Not EOF(26)
Input #26, mparameter(mparametercount)
'MsgBox mparameter(mparametercount)
mparametercount = mparametercount + 1
Loop
Close #26
End Sub
But after a VB2005 conversion this code reads inbetween
spaces and not the commas. Is there solution
for this.
thank you,
Last edited by HanneSThEGreaT; October 2nd, 2006 at 04:45 AM.
Reason: Added Code Tags
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
|