My ADO connection code: Private Sub ACCDBQuery () Dim rs As ADODB.Recordset Dim cn As ADODB.Connection Dim strDB As String Dim ws As Worksheet Dim n As Long Dim strSQL As String Set cn New ADODB.Connection Set rs New ADODB.Recordset Set ws ActiveSheet. ListObject.Name = queryName 'also assigns same value to. Hello, I want to execut a query to return a list of all tables from a DB through VBA. , Destination:=pqDestinationCell).QueryTable "OLEDB Provider=.1 Data Source=$Workbook$ Location=""" & queryName & """ Extended Properties=""""" _
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |