Dim strPath As String
Dim iFFN As Integer
Dim strBuffer As String
On Error Resume Next

With CommonDialog1
.ShowOpen
If Err.Number = cdlCancel Then
Exit Sub
End If
strPath = .filename
End With

iFFN = FreeFile
Open strPath For Input As iFFN
strBuffer = Space(LOF(iFFN))
strBuffer = Input(LOF(iFFN), #iFFN)
Close #iFFN
Text1.Text = strBuffer


the code is working perfectly .But can u explain it from step

iffn = freefile.