LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default change commandtext in pivotcaches

hello

i want to change the commandtext in pivotcaches

i've an odbc connection, then i create e pivot cache and a pivot table:
With ActiveWorkbook.PivotCaches.Add(xlExternal)
.Connection = _
"ODBC;DSN=test;UID=test;PWD=test"
.CommandText = (sql-statement)
.CreatePivotTable Range("A3"), "Pivot Table"
End With

then in step 2 i want to change the sql statement (p.e. with new date
selection):

With ActiveWorkbook.PivotCaches.Add(xlExternal)
.CommandText = (sql-statement 2)
End With

ActiveSheet.PivotTables("Pivot Tabelle").PivotCache.Refresh

but the cache wasn't refresh on the pivot table. the pivot table looks
with the old date too.

i also try:
set pvtCache = ActiveWorkbook.PivotCaches.Add(xlExternal)
but i work doesn't too.

can anyone help me, please?

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel graphs change when pasted into Publisher - Metafiles change? Ericd1 Charts and Charting in Excel 0 February 1st 10 01:57 AM
Excel bar chart formatting of bars to change colors as data change JudyT Excel Discussion (Misc queries) 1 January 24th 07 06:07 PM
Use date modified to change format & create filter to track change PAR Excel Worksheet Functions 0 November 15th 06 09:17 PM
making copied cells change with change in original cell Jennifer Mcdermeit Excel Worksheet Functions 2 July 20th 06 04:58 PM


All times are GMT +1. The time now is 09:21 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"