IN UN MODULO
Function LeggiFile(ByVal filename As String) As String Dim handle As Integer If Len(Dir$(filename)) = 0 Then Err.Raise 53 'file non trovato End If handle = FreeFile Open filename$ For Binary As #handle LeggiFile = Space$(LOF(handle)) Get #handle, ,LeggiFile Close #handle
Per richiamare la funzione
Text1.Text = LeggiFile(xxx.txt)
Aggiungi un commento