如下代码,我想测试双击关联文件,假设(双击c:\01.aaa文件, 由下面代码生成的project1.exe打开), 结果出现错误,错误编号:52,错误描述是: 错误文件名或数, 错误位置在 Open fname For Binary As #fNumber 这条语句上..有谁能帮我看看哪里出错了?Option ExplicitPrivate Sub Form_Load()
Dim rlsfn As String
rlsfn = Command()
If Len(rlsfn) > 0 Then
rOpenFile rlsfn
End If
End SubPrivate Sub rOpenFile(fname As String) Dim fNumber As Long fNumber = FreeFile Open fname For Binary As #fNumber
MsgBox "success"
Close #fNumberEnd Sub
Dim rlsfn As String
rlsfn = Command()
If Len(rlsfn) > 0 Then
rOpenFile rlsfn
End If
End SubPrivate Sub rOpenFile(fname As String) Dim fNumber As Long fNumber = FreeFile Open fname For Binary As #fNumber
MsgBox "success"
Close #fNumberEnd Sub
解决方案 »
- 点击按键保存数据到txt
- VB 6 的报表在VISTA下出错
- 设置用户控件的属性,取消比如visible等属性
- 在固定字符中间添加不固定字符的程序
- textbox只能保存可见的数据
- 客户端IE不能自动下载VB编写的OCX
- 在VB6中,如何将List1.AddItem "记录个数" 中的“记录个数”显示为红色
- 将一个字符串写入注册表,怎末办,写在注册表何处合适?
- vb数据库
- 用VB向导做出的程序比access差得实在太远了,ms在写VB向导时为什么不参考自己的access呢?难道ms写VB时没尽全力???
- 求可将BMP文件转换为JPG格式文件的DLL,VIC32.DLL
- 10w次潜水,今上来发个自己写的软件,要源代码的跟贴咯
Dim rlsfn As String
rlsfn = Command()
rlsfn = Replace(rlsfn, """", "") '把前后多余的引号去掉,用mid也可以
If Len(rlsfn) > 0 Then
rOpenFile rlsfn
End If
End Sub