|
Current revisionThis function reads lines from a text-based file and returns the in a VBA string. See also: FileToByteArray CODE ' FileToString ' http://www.utteraccess.com/wiki/index.php/FileToString ' Code courtesy of UtterAccess Wiki ' Licensed under Creative Commons License ' http://creativecommons.org/licenses/by-sa/3.0/ ' ' You are free to use this code in any application, ' provided this notice is left unchanged. ' ' rev date brief descripton ' 1.0 2012-01-17 ' Public Function FileToString(SourceFile As String) As String 'prelim, no validations yet Dim i As Integer Dim s As String i = FreeFile Open SourceFile For Input As #i s = Input(LOF(i), i) Close #i FileToString = s End Function
|
|||||||||||||||||||||||||||||||||
| This page has been accessed 7,251 times. This page was last modified 02:36, 12 May 2012 by Jack Leach. Disclaimers |