hello, i made a text file program like notepad where you save and open text files, but when i open a text file with spaces it only opens one line of it, heres the code for opening it, tell me whats wrong:

Private Sub mnuopen_Click()
On Error GoTo h
Dim strTemp As String
dlg.Filter = "Text files (*.txt)|*.txt"

dlg.FileName = "*.txt"
dlg.ShowOpen
If Dir(dlg.FileName) > "" Then

Open dlg.FileName For Input As #1

Line Input #1, a
text1 = a

Close #1
Else
MsgBox "File not found", vbExclamation, "Error" & Err.Description
End If
h:

End Sub