Another route would be to use the Excel spreadsheet as if it were a database using ADO or RDO. Here's a quick dirty ADO example:
Code:Sub OpenExcelDatabase(strDBPath As String) Dim cnnDB As ADODB.Connection Set cnnDB = New ADODB.Connection ' Specify Excel 8.0 by using Extended Properties ' property, and then open Excel file specified by strDBPath. With cnnDB .Provider = "Microsoft.Jet.OLEDB.4.0" .Properties("Extended Properties") = "Excel 8.0" .Open strDBPath Debug.Print .ConnectionString .Close End With Set cnnDB = Nothing End Sub




Reply With Quote