GetString ADO.
Dim cn As Object
Dim rs As Object
Dim strFile As String
Dim strCon As String
Dim strSQL As String
Dim s As String
''This is not the best way to refer to the workbook
''you want, but it is very conveient for notes
''It is probably best to use the name of the workbook.
strFile = ActiveWorkbook.FullName
strCon = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strFile _
& ";Extended Properties=""Excel 8.0;HDR=No;IMEX=1"";"
Set cn = CreateObject("ADODB.Connection")
Set rs = CreateObject("ADODB.Recordset")
cn.Open strCon
strSQL = "SELECT * " _
& "FROM [Sheet1$A:A] "
rs.Open strSQL, cn, 3, 3
''http:
''str = rs.GetString(format,rows,coldel,rowdel,nullexpr)
s = rs.GetString(, , , ", ")
ActiveSheet.Range("B1") = s
''Tidy up
rs.Close
Set rs = Nothing
cn.Close
Set cn = Nothing