Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Impossible to find error

I'm working on macros.
I've build a spreadsheet and then I press the register new macro button ..I
registered the macro that built a pivot table in a new spreadsheet..
I pressed end registration...and saved the macro.
I closed the file without saving .
I reopened the file and execute the macro.Then I got the error.
Impossible to find the property PivotFields for the PivotTableClass.
How can I solve this?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 156
Default Impossible to find error

Can you please post your code so we can have a look at it, and also,
highlight the line that causes the error.

It may just be that the code is not referencing the worksheet...so it can't
find the pivot table

Philip

"Rossy" wrote:

I'm working on macros.
I've build a spreadsheet and then I press the register new macro button ..I
registered the macro that built a pivot table in a new spreadsheet..
I pressed end registration...and saved the macro.
I closed the file without saving .
I reopened the file and execute the macro.Then I got the error.
Impossible to find the property PivotFields for the PivotTableClass.
How can I solve this?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Impossible to find error

Here's the code

Cells.Select
ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatab ase, SourceData:= _
"Report_Incasso_Macro_Ramo!C1:C30").CreatePivotTab le
TableDestination:="", _
TableName:="Tabella_pivot1", DefaultVersion:=xlPivotTableVersion10
ActiveSheet.PivotTableWizard TableDestination:=ActiveSheet.Cells(3, 1)
ActiveSheet.Cells(3, 1).Select
With ActiveSheet.PivotTables("Tabella_pivot1").PivotFie lds("AGENZIA")
.Orientation = xlRowField
.Position = 1
End With
With ActiveSheet.PivotTables("Tabella_pivot1").PivotFie lds("MACRO-RAMO")
.Orientation = xlRowField
.Position = 2
End With
With ActiveSheet.PivotTables("Tabella_pivot1").PivotFie lds("Tipo")
.Orientation = xlRowField
.Position = 3
End With
ActiveSheet.PivotTables("Tabella_pivot1").AddDataF ield
ActiveSheet.PivotTables( _
"Tabella_pivot1").PivotFields("Somma Di SommaDiNetto"), _
"Conteggio di Somma Di SommaDiNetto", xlCount
ActiveSheet.PivotTables("Tabella_pivot1").AddDataF ield
ActiveSheet.PivotTables( _
"Tabella_pivot1").PivotFields("Somma Di Netto_Gennaio"), _
"Conteggio di Somma Di Netto_Gennaio", xlCount
ActiveSheet.PivotTables("Tabella_pivot1").AddDataF ield
ActiveSheet.PivotTables( _
"Tabella_pivot1").PivotFields("Somma Di Netto_Febbraio"), _
"Conteggio di Somma Di Netto_Febbraio", xlCount
End Sub

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 156
Default Impossible to find error

Ok,

First, check the name of the activesheet - is the activesheet (referenced by
the code) the worksheet that has the pivot table on it.

Then, if it's referencing the correct worksheet, check the fieldnames of the
pivot table.

Exactly which line of code gives the error?

Philip

"Rossy" wrote:

Here's the code

Cells.Select
ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatab ase, SourceData:= _
"Report_Incasso_Macro_Ramo!C1:C30").CreatePivotTab le
TableDestination:="", _
TableName:="Tabella_pivot1", DefaultVersion:=xlPivotTableVersion10
ActiveSheet.PivotTableWizard TableDestination:=ActiveSheet.Cells(3, 1)
ActiveSheet.Cells(3, 1).Select
With ActiveSheet.PivotTables("Tabella_pivot1").PivotFie lds("AGENZIA")
.Orientation = xlRowField
.Position = 1
End With
With ActiveSheet.PivotTables("Tabella_pivot1").PivotFie lds("MACRO-RAMO")
.Orientation = xlRowField
.Position = 2
End With
With ActiveSheet.PivotTables("Tabella_pivot1").PivotFie lds("Tipo")
.Orientation = xlRowField
.Position = 3
End With
ActiveSheet.PivotTables("Tabella_pivot1").AddDataF ield
ActiveSheet.PivotTables( _
"Tabella_pivot1").PivotFields("Somma Di SommaDiNetto"), _
"Conteggio di Somma Di SommaDiNetto", xlCount
ActiveSheet.PivotTables("Tabella_pivot1").AddDataF ield
ActiveSheet.PivotTables( _
"Tabella_pivot1").PivotFields("Somma Di Netto_Gennaio"), _
"Conteggio di Somma Di Netto_Gennaio", xlCount
ActiveSheet.PivotTables("Tabella_pivot1").AddDataF ield
ActiveSheet.PivotTables( _
"Tabella_pivot1").PivotFields("Somma Di Netto_Febbraio"), _
"Conteggio di Somma Di Netto_Febbraio", xlCount
End Sub

Reply
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
Error dialog box meaning and how to find error Jeanne Excel Worksheet Functions 2 September 4th 08 04:59 AM
help with this error-Compile error: cant find project or library JackR Excel Discussion (Misc queries) 2 June 10th 06 09:09 PM
Am I trying the impossible? Max_power Excel Discussion (Misc queries) 5 March 23rd 06 09:27 PM
IMPOSSIBLE? AdrianCl Excel Worksheet Functions 2 February 15th 05 03:50 AM
Is it possible or is it impossible? 71paolo71[_6_] Excel Programming 3 May 8th 04 10:34 PM


All times are GMT +1. The time now is 10:20 PM.

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"