启恒这个名字的意思:告诉我下,急啊,VB编程
来源:百度文库 编辑:杭州交通信息网 时间:2024/04/29 02:19:44
小弟用如下代码编了一个小程序:
Dim db As Database
Dim rs As Recordset
Private Sub cmdAdd_Click()
new挑战者 = InputBox("请留下您的姓名班级和QQ", "AddressBook")
With rs
.AddNew
!挑战者 = LCase(new挑战者)
.Update
End With
MsgBox (newName & " 您的信息已保存")
End Sub
Private Sub Command1_Click()
Unload Me
End Sub
Private Sub Command2_Click()
new好友 = InputBox("请留下您的姓名班级和QQ", "AddressBook")
With rs
.AddNew
!好友 = LCase(new好友)
.Update
End With
MsgBox (newName & " 您的信息已保存")
End Sub
Private Sub Command3_Click()
Unload Me
End Sub
Private Sub Form_Load()
Set db = OpenDatabase(App.Path + "/tiaozhanshu.mdb")
Set rs = db.OpenRecordset("tzs1")
If rs.EOF Then
MsgBox "Please Add Someone To The Databse"
Else
rs.MoveFirst
txtName = rs.Fields("文本")
txtEmail = rs.Fields("交友")
End If
End Sub
Private Sub Label1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label1.ToolTipText = txtName.Text
End Sub
Private Sub Label2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label2.ToolTipText = txtEmail.Text
End Sub
在本机可以正常运行,但是放到别的机起上却不能运行出现了下面的文字:
Run-time error '429' :
ActiveX compinent can't create object
高手告诉下该如何解决,急啊!~~~谢了
Dim db As Database
Dim rs As Recordset
Private Sub cmdAdd_Click()
new挑战者 = InputBox("请留下您的姓名班级和QQ", "AddressBook")
With rs
.AddNew
!挑战者 = LCase(new挑战者)
.Update
End With
MsgBox (newName & " 您的信息已保存")
End Sub
Private Sub Command1_Click()
Unload Me
End Sub
Private Sub Command2_Click()
new好友 = InputBox("请留下您的姓名班级和QQ", "AddressBook")
With rs
.AddNew
!好友 = LCase(new好友)
.Update
End With
MsgBox (newName & " 您的信息已保存")
End Sub
Private Sub Command3_Click()
Unload Me
End Sub
Private Sub Form_Load()
Set db = OpenDatabase(App.Path + "/tiaozhanshu.mdb")
Set rs = db.OpenRecordset("tzs1")
If rs.EOF Then
MsgBox "Please Add Someone To The Databse"
Else
rs.MoveFirst
txtName = rs.Fields("文本")
txtEmail = rs.Fields("交友")
End If
End Sub
Private Sub Label1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label1.ToolTipText = txtName.Text
End Sub
Private Sub Label2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label2.ToolTipText = txtEmail.Text
End Sub
在本机可以正常运行,但是放到别的机起上却不能运行出现了下面的文字:
Run-time error '429' :
ActiveX compinent can't create object
高手告诉下该如何解决,急啊!~~~谢了
别的机上不支持!没有vb!
别的机器没有VB运行库。或者是你打包的时候没有打完整。
机子里无法支持你的运行!也就是说,调用不出来