VB 编程 75号错误,程序 提示路径/文件访问错误
加入了给 文本框加了一个保存 很打开带功能,有这问题
'保存:
Private Sub Command11_Click()
With CommonDialog1
.DialogTitle = "保存文件"
.Filter = "Esprit后处理(*.asc)|*.asc|所以文件(*.*)|*.*"
.FilterIndex = 0
.ShowSave
Open .FileName For Output As #2
Print #2, Text100.Text
Close #2
End With
End Sub
'打开:
Private Sub Command10_Click()
With CommonDialog1
.DialogTitle = "打开文件"
.Filter = "Esprit后处理(*.asc)|*.asc|所以文件(*.*)|*.*"
.FilterIndex = 0
.ShowOpen
Dim tmpLoadStr As String
Open .FileName For Input As #1
Do While Not EOF(1)
Line Input #1, tmpLoadStr
Text100.Text = Text100.Text & tmpLoadStr & vbCrLf
Loop
Close #1
End With
End Sub
以上是我使用的代码 ,希望高手能帮帮我
补充:Open .FileName For Output As #2Open .FileName For Output As #1
路径这两句
我用的但是 CommonDialog 控件
追问:能帮我解决吗?