
Please Help - VBA DAO in EXCEL 7.0
Hi;
I am tring to program in Excel 7.0 to retrieve data from an Access 2.0
database. It seems trivial in the books but when I followed the book
step by step, I got run time error "424": object required. Could anyone
help me out here?
Thanks
Meng Li
P.S. Here is the code I was running:
Sub Sec3()
Dim dbs As Database, rst As Recordset, tbl As TableDef
strFilename = Application.GetOpenFilename(filefilter:="Database Files
(*.mdb), *.mdb; ", filterindex:=1)
Set dbs = OpenDatabase(strFilename)
If strFilename = False Then
Exit Sub
ElseIf Err Then
MsgBox "Could not open " & strFilename & "as a database file."
Exit Sub
End If
End Sub