If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > VB Data to Pivot table

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-29-04, 04:37
ManClarky ManClarky is offline
Registered User
 
Join Date: Jan 2004
Location: Lancashire, UK
Posts: 6
Post VB Data to Pivot table

Morning.
I sent data to Excel from a VB6 application through ADO.

I recorded a macro to create a pivot table from this data, and copied the macro into the VB application, but am gettting the error:

"Unable to get the pivotfields property of the pivottable class"

Any ideas gratefully received.
Reply With Quote
  #2 (permalink)  
Old 01-31-04, 15:16
warba warba is offline
Registered User
 
Join Date: Nov 2003
Posts: 7
Re: VB Data to Pivot table

RE: "Unable to get the pivotfields property of the pivottable class"

Either the property really does not exist (double check the data that is being returned) or you are maybe having the bug in older versions of excel where the vb macro access to the pivot object would disconnect, therefore no objects are viewable from the code. This was patched up in later versions of office2000 and xp.

If it is a data issue, you can debug your macro to determine the exact property it is looking for, then look to ensure your data has the required field(s) and values.
Reply With Quote
  #3 (permalink)  
Old 03-09-05, 10:58
MPKusnierz MPKusnierz is offline
Registered User
 
Join Date: Mar 2005
Posts: 1
What bug would this be. I am having a strange situation where I can get up to a point in customising a pivot table through VBA, and then when attempting to read the name property of a pivotitem I get the error:
"Unable to get the pivotfields property of the pivottable class"

Strangely even if I break before this line of code runs, and using the watch window look at the properties of the pivot item, the pivot table becomes unreadable, even though before I browsed the pivotitem properties in the watch window it was fine.
Reply With Quote
  #4 (permalink)  
Old 03-09-05, 11:18
warba warba is offline
Registered User
 
Join Date: Nov 2003
Posts: 7
[QUOTE=MPKusnierz]What bug would this be.

This was a bug (from 2003) that was in Excel 2000, but we worked w/ MS and they create a hotfix and it was included in subsequent office updates.
Any fully patched office 2000 or greater version will include a fix for this bug.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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