ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   MS Query in VBA (https://www.excelbanter.com/excel-programming/327405-ms-query-vba.html)

Jacqueline[_3_]

MS Query in VBA
 
I have a set of VBA code to create a pivot table using the
data from MS ACCESS. I am using ODBC to connect with MS
ACCESS. This set of code is working good in MS Office
2002 and now I have changed the Office version to MS
Office 2003. When the upgrade is done, the
PivotTableWizard function in the VBA is not working well.
The message said that waiting for the MSQuery to response,
however, this is waiting forever. Does anyone know that
there is any new version of the MSQuery which come along
with the MS Office2003?

The problem coding is found as the following:

ActiveSheet.PivotTableWizard _
SourceType:=xlExternal, _
SourceData:=Array("Select * from " & dbsource), _
TableDestination:="", _
TableName:="Pivot", _
Connection:="ODBC;DSN=MS Access for
Database;DBQ=c:\database.mdb;", _
OptimizeCache:=True



Thanks in advance for any advice.





All times are GMT +1. The time now is 06:40 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com