無法讀檔....(編號:6879)

你好啊,我本來寫了一個程式,後來想用VB中的封包功能做成網頁,所以我開了另一個視窗加入Active X Document執行檔,然後再將原本的表單複製過來,結果執行時無法將檔案讀入,可是在原本的程式裡都OK啊!!那些元件也都有載入啊!!那一段錯誤的程式碼如下:
Private Sub mOpen_Click() ' 『檔案/開啟舊檔』命令
Dim S As String, f As Integer
If Changed = True Then
If QuerySaveFile = False Then Exit Sub
End If
On Error Resume Next
With CommonDialog1
.CancelError = True
If Len(.InitDir) = 0 Then .InitDir = App.Path
.DialogTitle = "開啟文字檔"
.Filter = "(*.nc)!*.nc!所有檔案(*.*)!*.*"
.ShowOpen
If Err.Number <> cdlCancel Then
fs = CreateObject("FileSystemObject")
txtf = CreateObject("TextStream")
Set txtf = fs.OpenTextFile(.filename, ForReading)
Text1.Text = txtf.ReadAll
txtf.Close
Changed = False
End If
End With
End Sub