1.Range(“h23").Value
Dim sql1 As String
Dim db1 As Database
Dim rs1 As Recordset
sql1 = “SELECT * From 代码字典"
sql1 = sql1 + “WHERE (((代码字典.代码)=
" & daima1 & “))"
Setdb1 =OpenDatabase(Application.ThisWorkbook.Path
+ “\cngl.mdb")
Set rs1 = db1.OpenRecordset(sql1, dbOpenDynaset)
Sheet1.Range(“h41").Value = rs1.Fields(“代码字典名称")
Exit Sub
error:
MsgBox (“日期输入错误")
panduan = False
End Sub
Private Sub TextBox1_Change()
End Sub
Private Sub UserForm_Activate()
dyxjkc.Top = 30
dyxjkc.Left = 230
End Sub
----具体的表格画线可以由Excel自动完成,因此简化了VB 编程的步骤,并且节约调试
程序和画线定位的时间。