Ouput Array

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Newbie, so please bear with me....

I need to output data gathered from an array into a text file. Can someone
provide an example of this?
 
Sash said:
Newbie, so please bear with me....

I need to output data gathered from an array into a text file. Can
someone provide an example of this?

I'm not exactly sure what you have in mind, but here's a very simple
example that demonstrates what I think would be the elements.

'----- start of example code -----
Dim astrMyArray(99) As String
Dim intFileNo As Integer
Dim I As Integer

intFileNo = FreeFile()
Open "C:\Temp\OutFile.txt" For Output As #intFileNo

For I = LBound(astrMyArray) To UBound(astrMyArray)
Print #intFileNo, astrMyArray(I)
Next I

Close intFileNo
'----- end of example code -----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top