By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,917 Members | 1,305 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,917 IT Pros & Developers. It's quick & easy.

FileSystemObject, ReadLine and Tabs

P: n/a
I am using a FileSystemObject to open a text file and the ReadLine
method to read the file line by line.
Set fs = CreateObject("Scripting.FileSystemObject")
Set ReptFile = fs.OpenTextFile(file, 1, 0)

Reptln = ReptFile.ReadLine
My file has tabs delimiting some of the values. It appears (from the
debugger) that the tabs are being ignored, leaving me with a
non-delimited line of text.

Am I missing something here? I would like the tabs to remain and I
don't want to convert my file before reading it via VB.

Suggestions appreciated!

Wendy Powley
School of Computing
Queen's University
Kingston, ON
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On 24 May 2004 20:17:27 -0700, we***@cs.queensu.ca (Wendy Powley)
wrote:

That may be because of limitations of the debugger display. Try adding
this after reading the line:
debug.print Instr(Reptln, vbTab)

Works for me: it correctly finds the tab characters.

-Tom.
I am using a FileSystemObject to open a text file and the ReadLine
method to read the file line by line.
Set fs = CreateObject("Scripting.FileSystemObject")
Set ReptFile = fs.OpenTextFile(file, 1, 0)

Reptln = ReptFile.ReadLine
My file has tabs delimiting some of the values. It appears (from the
debugger) that the tabs are being ignored, leaving me with a
non-delimited line of text.

Am I missing something here? I would like the tabs to remain and I
don't want to convert my file before reading it via VB.

Suggestions appreciated!

Wendy Powley
School of Computing
Queen's University
Kingston, ON


Nov 13 '05 #2

P: n/a
On 24 May 2004 20:17:27 -0700, we***@cs.queensu.ca (Wendy Powley)
wrote:

That may be because of limitations of the debugger display. Try adding
this after reading the line:
debug.print Instr(Reptln, vbTab)

Works for me: it correctly finds the tab characters.

-Tom.
I am using a FileSystemObject to open a text file and the ReadLine
method to read the file line by line.
Set fs = CreateObject("Scripting.FileSystemObject")
Set ReptFile = fs.OpenTextFile(file, 1, 0)

Reptln = ReptFile.ReadLine
My file has tabs delimiting some of the values. It appears (from the
debugger) that the tabs are being ignored, leaving me with a
non-delimited line of text.

Am I missing something here? I would like the tabs to remain and I
don't want to convert my file before reading it via VB.

Suggestions appreciated!

Wendy Powley
School of Computing
Queen's University
Kingston, ON


Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.