Do pivot tables have code?

goodfu

Registered User.
Local time
Today, 12:22
Joined
Dec 23, 2010
Messages
140
Is there a SQL view for pivot tables like there is for queries? Or any way to modify a pivot table with code?
 
Well, you'd use a query as a source for a pivottable so you'd use SQL view of that query.

As for manipulating the presentation of pivottable itself, yes, you'd use the Office Web Components to provide the OM for the PivotTable & associated objects. You can get intellisense support if you add a VBA reference to OFFOWC.DLL (located in the OfficeXX folder where XX = the version of your installation {14 = 2010; 12 = 2007; 11 = 2003 } ) though I recommend that you remove the reference when you're done with development so your users don't have problems running it on different version. If you're unfamiliar with concept of early binding/late binding read up on this first so you understand the effect of adding the reference.

Then for the documentation, use MSDN - This'll get you started.

HTH.
 
Where is the code for my existing pivot table? You're right, there is a query and you can go into SQL view and look at the query. But it's just an ordinary query. And the form is just a form with textboxes on it.
 

Users who are viewing this thread

Back
Top Bottom