帮我改改这VB题 - VB / 基础类
帮我改改 我总觉得有问题
Type ID
number As Single
score As Integer
name As String * 6
End Type
Dim personl As ID, i%
Private Sub Command1_Click()
i = 0
xpath = App.Path & "\ku\score.txt"
Open xpath For Random As #1 Len = Len(personl)
personl.number = Val(Text1.Text)
personl.score = Val(Text2.Text)
personl.name = Text3.Text
Put #1, Val(Text4.Text), personl
i = i + 1
Close #1
MsgBox "学生信息已写入!", vbInformation
Label1.Caption = "总记录数:" + i
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
End Sub
Private Sub Command2_Click()
xpath = App.Path & "\ku\score.txt"
Open xpath For Random As #1 Len = Len(personl)
Get #1, Val(Text4.Text), personl
Text1.Text = personl.number
Text2.Text = personl.score
Text3.Text = personl.name
End Sub
哪里有问题?
别考人!
VB code:
Private Type ID
number As Single
score As Integer
name As String * 6
End Type
Dim personl As ID, i%
Private Sub Command1_Click()
xp
相关问答:
请教一下:我用vb写了一个调用Illustrator的测试程序,代码很简单:Private Sub Command1_Click()
Dim app As New Illustrator.Application
Dim doc As Illustrator.Document
Dim thislayer As Illustrator.Layer ......
在vb这编程里似乎有很多的东西是相联系的,为什么有些人对vb的编程摸不到头脑啊!并且有些事很容易的,但是却把它们的代码变成复杂,也去想一些不能实现的东西啊!
没分了,楼主多来点分!
来接点分
......
在下是vb的新手,想写段程序,在vb中,使用wscript调用一些外部的命令,但是程序执行一直有错误,请各位高手帮忙解答下,谢谢。
代码如下:
VB code:
Private Function getFile_CMD(filename, filepath) As Bo ......
我是VB的新成员,现在想用VB来做个TXT文档,请大家给我代码及介绍一下相应的控件!
非常感谢!!!!!!
可以用一些OFFICE控件
google上找一下吧,VB写入TXT,很多样例代码的
直接调查用就可以了
面对美女 ......