Thread: MS Query in VBA
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jacqueline[_3_] Jacqueline[_3_] is offline
external usenet poster
 
Posts: 1
Default 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.