UtterAccess HomeUtterAccess Wiki

Welcome Guest ( Log In | Register )

Edit Discussion
> FileToString    
(Difference between revisions)
Revision as of 10:52, 17 January 2012
Jleach (Talk | contribs)

← Previous diff
Current revision
Jleach (Talk | contribs)
(added See Also: FileToByteArray)
Line 1: Line 1:
This function reads lines from a text-based file and returns the in a VBA string. This function reads lines from a text-based file and returns the in a VBA string.
 +
 +See also: [[FileToByteArray]]
[code] [code]

Current revision

This 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


Creative Commons License
FileToString by UtterAccess Wiki is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Editing and revision of the content is freely encouraged; for details, see Expected Usage.

Edit Discussion
Thank you for your support!
This page has been accessed 7,251 times.  This page was last modified 02:36, 12 May 2012 by Jack Leach.   Disclaimers