Hi,
Just posted that one to xl news
Have a try with this, using ADO :
Sub TEST()
'this requires to make a ref via tool
'to Microsoft ActiveX Data Object 2.x
Dim cn As ADODB.Connection
Dim rec As ADODB.Recordset
Set cn = New Connection
Set rec = New Recordset
'open the connection
cn.Open "Provider=SQLOLEDB.1;Data Source=Mydatabase/path", "userID",
"password"
'open the recordset
rec.Open "select myCcol from MyTable where myconditon = '" & "The
paramneter" &
"';", cn, adOpenForwardOnly, adLockOptimistic
Do While rec.EOF = False
msgbox rec.Fields("CreatedDate").Value
'optional for multiple records
'rec.MoveNext
Loop
rec.Close
cn.Close
Set rec = Nothing
Set cn = Nothing
End Sub
Regards
JY
> Hi there,
>
[quoted text clipped - 8 lines]
>
> Any tips or advise would be really great!!