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
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