4 Rem Test accessing an object that has default object member
5 Rem which in turn has a default member that is a method
6 Function doUnitTest(TestData
As String) As String
8 Dim modifiedTimout
As Long
9 Dim cnn1
As New ADODB
.Connection
10 Dim rst1
As New ADODB
.Recordset
12 cnn1
.Open
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
13 "Data Source=" & TestData
& ";" & _
14 "Extended Properties=""Excel 8.0;HDR=Yes"";"
15 rst1
.Open
"SELECT * FROM [Sheet1$];", cnn1, adOpenStatic, adLockReadOnly
17 val = rst1("FirstName
")
21 doUnitTest = "Failed
, expected
'Paddy' got " & val