Bump version to 4.1-6
[LibreOffice.git] / basic / qa / vba_tests / ole_dfltObjDflMethod.vb
blobf24786098e48e9f3380ad8cfc9105b043e052ab8
1 Option VBASupport 1
2 Option Explicit
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
7 doUnitTest = "Begin"
8 Dim modifiedTimout As Long
9 Dim cnn1 As New ADODB.Connection
10 Dim rst1 As New ADODB.Recordset
11 Dim conStr As String
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
16 Dim val
17 val = rst1("FirstName")
18 If val = "Paddy" Then
19 doUnitTest = "OK"
20 Else
21 doUnitTest = "Failed, expected 'Paddy' got " & val
22 End If
24 End Function