README.md
December 5, 2022 ยท View on GitHub
Description
Read an entire text file into a string in one call.
More Info
sFileName As String
String containing file contents.
| Submitted On | |
| By | James Vincent Carnicelli |
| Level | Unknown |
| User Rating | 4.8 (19 globes from 4 users) |
| Compatibility | VB 3.0, VB 4.0 (16-bit), VB 4.0 (32-bit), VB 5.0, VB 6.0 |
| Category | String Manipulation |
| World | Visual Basic |
| Archive File |
Source Code
Public Function ReadFile(ByVal sFileName As String) As String
Dim fhFile As Integer
fhFile = FreeFile
Open sFileName For Binary As #fhFile
ReadFile = Input$(LOF(fhFile), fhFile)
Close #fhFile
End Function