View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Gaston[_7_] Gaston[_7_] is offline
external usenet poster
 
Posts: 1
Default Passing parameters between functions

I'm trying to do a macro that'll get data from a spreadsheet and prin
it out to a txt file. I use the following:

Open "test.txt" For Output As #1
'some code
Write #1, "This is some test data"
'more code
Close #1

My problem is that I've written a few functions to write more data t
output, but I don't know how I can pass in #1(the open text file) t
these functions to let them be able to write to the file.

I tried closing the file before running the function, and then withi
the function using the following:
Open "test.txt" For Append As #1
But that does nothing. Anybody know how I can do it then?
Thanks in advanced

--
Message posted from http://www.ExcelForum.com