snippets / Write to a textfile

Language: Visual Basic .Net - First posted by qrist0ph on 2008-05-7 00:09 (1 month, 4 weeks)
Link to the snippet: http://www.friendsnippets.org/snippet/290/

.

1 Sub WriteToATextFile(s As String)
2 MyFile = ActiveWorkbook.Path & "\graph.dot"
3 'set and open file for output
4 fnum = FreeFile()
5 Open MyFile For Output As fnum
6 'write project info and then a blank line. Note the comma is required
7 Print #fnum, s
8 Close #fnum
9 End Sub
In order to post a comment, you should have a friendsnippet account. Please sign-in.

0 comments

May '08

Common Tags


Related snippets

0 snippets in relation for now.


snippet History

May '08