Private Sub Command1_Click()//运行时总显示这里“子程序或函数未定义” Dim db As Database Dim rs As Recordset Dim ws As Workspace Set ws = CreateWorkspace("", "admin", "", dbUseJet) Set db = ws.OpenDatabase(App.path + "\", False, False, "foxpro 2.5;") Set rs = db.OpenRecordset("select * from block.dbf where [blockname] like '" + trime(Text1.Text) + "'", dbOpenDynaset) If rs.RecordCount Then MsgBox "此板块已存在" rs.Close db.Close ws.Close Exit Sub End If End Sub Dim db As Database Dim rs As Recordset Dim ws As Workspace 这些都需要引用。
我想把word另存为xml之后,用vb读取这个xml的内容,请问如何实现? dim f as integer dim b() as byte dim s as string dim L as long f=freefile() open "abc.xml" for binary access read as #f ......
Private Sub Command1_Click() Dim MyString() As String Open "a.xml" For Binary As #1 ' 打开刚创建的文件。 ReDim MyString(LOF(1) - 1) Put #1, , MyRecord ' 读入所有字符到变量中 ......