Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to write data and tab

Status
Not open for further replies.

cpanon

Programmer
Feb 5, 2007
5
US
Hello
I do not know how to write content of an array and a tab to a file. I have all the file handling working, my questions is how to do the actual write. The items in the array are all text strings but this doesnt work
write #1 myRng(i,j) & vbTab
with the obvious assumptions. I just want to write the array value and a tab to my tab-delimited file in the next location. tia.
 



Hi,

Do you have an OPEN statement?

Have you checked VBA Help on the Write # statement?

What specifically is not working?

Skip,

[glasses] [red][/red]
[tongue]
 
write #1[red],[/red] myRng(i,j) & vbTab ?

_________________
Bob Rashkin
 
Hi All
I have fixed this with the following
Code:
For i = (LBound(stringArray) + 1) To UBound(stringArray)
        Debug.Print stringArray(i)
        Print #fnum, (stringArray(i) & vbTab);
    Next
    Print #fnum, vbTab
Close #fnum
I was surprised that it really needed the ";" to write the values as fields. I found that out from a MS Tip on
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top