vb缺少对象 - VB / 基础类
VB code:
Private Sub Command4_Click()
Dim TempFile As Long
Dim LoadBytes() As Byte
Dim txtPath As String
TempFile = FreeFile
txtPath = c:
Open txtPath \ domain.txt For Binary As #TempFile
ReDim LoadBytes(1 To LOF(TempFile)) As Byte
Get #TempFile, , LoadBytes
Close TempFile
Text1.Text = StrConv(LoadBytes, vbUnicode)
End Sub
这个代码是导入txt到text1内的代码
编译提示缺少对象
txtPath ="c:\"
Open txtPath & "domain.txt" For Binary As #TempFile
Open txtPath & "domain.txt" For Binary As #TempFile
ReDim LoadBytes(1 To LOF(TempFile)) As Byte
改为
ReDim Preserve LoadBytes(1 To LOF(TempFile)) As Byte
没注意看 一看又是个问题
Close TempFile
改为
Close #TempFile
果然很菜。。。俺们有得一拼
txtPath ="c:\"
Open txtPath & "domain.txt" For Binary As #TempFile
VB code:
txtPath="C:\domain.txt"
Open txtPath For Binary As #TempFile
很牛,不是牛肉干。。。
txtPath = c:
Open txtPath \ domain.txt
代码执行:
复
制
黏
贴
最
好
不
过
!
相关问答:
在下是vb的新手,想写段程序,在vb中,使用wscript调用一些外部的命令,但是程序执行一直有错误,请各位高手帮忙解答下,谢谢。
代码如下:
VB code:
Private Function getFile_CMD(filename, filepath) As Bo ......
初学,大胆提问,请高手不吝赐教
1、滚动条点击与绘图板(屏幕,Piceure1)的移动问题已经解决。
Picture1.Top = -VScroll1.Value + bcW '垂直移动
Picture1.Left = -HScroll1.Value + bcW ' ......
可以吗
好奇怪的题目额!!
可以告诉我们你到底想问什么 ?
2分给我的话就可以。
........................可以吗
可以!
纠结,
29. vb可以这样做不? ( H )√
A. ......
数据库貌似已经连接上了vb,,可是为什么数据库上的数据不能显示在框表中捏???
具体的代码?
无码无真相!
你把篮球抱在怀里,就能远投得3分?
麻烦各位大虾了啊。。。
Private Sub Comm1_Click()
& ......