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 Pivot Table's query

Hi,

I'm trying to change the sql statement of a Pivot Table through VB6.
But, on the following line,
pt.PivotCache.sql =
StringToArray(ExcelWorkbook.Application.Substitute (pt.PivotCache.sql,
OldSQL, NewSQL))

I get the following error:
1004 - Application-defined or object-defined error

I've also tried with:
pt.PivotCache.CommandText =
StringToArray(ExcelWorkbook.Application.Substitute (pt.PivotCache.Command
Text, OldSQL, NewSQL))

but I get the same error. Any ideias?




*** Sent via Developersdex http://www.developersdex.com ***
 
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
how do I extend an existing pivot table's range Chris Smith Excel Discussion (Misc queries) 4 June 15th 07 06:02 PM
Identifying Pivot Table's Field Juan Sanchez Excel Programming 2 October 5th 04 03:06 PM
Imitating Pivot table's context awareness R Avery Excel Programming 3 September 17th 04 05:19 PM
Accessing Pivot Table's Data in VBA spjoseph0511 Excel Programming 3 November 14th 03 03:15 AM
Accessing Pivot Table's Data spjoseph0511[_2_] Excel Programming 1 November 13th 03 07:36 PM


All times are GMT +1. The time now is 04:03 AM.

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

About Us

"It's about Microsoft Excel"