By using vba.booksticle.com you agree to our cookie policy, We and our partners operate globally and use cookies, for multiple purposes
948 Steps to 6 Figures by Learning Excel-VBA and Other Skills
Step 378 - LoadData(sFile) - udf - loads a file's data to a string
Function LoadData(sFile as string)
Dim x
Dim sData As String
Dim sRec As String
x = bOpenSeqfile(sfile,"I")
if x < 0 then
Msgbox "File " & sFile " not found"
Stop
End if
Line Input #x, sData
sRec = sRec & sData & vbCRLF
Do While Not Eof(x)
Line Input #x, sData
sRec = sRec & sData & vbCRLF