Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Trouble recreating Pivot table changes in VBA

Im having some problems with my pivot table changes in VBA

I am calling my pivot table up like below but when I add the sourcetyp
and sourcedata, it gives me the following error:

Run Time Error '1004';
The Pivot table field name is not valid. To create a pivot tabl
report, you must use data that is organised as a list with labelle
columns. If you are changing the name of a pivot table field , you mus
type a new name for the field

Here is my code:
[vb]
Sheets("source Code").Activate
ActiveSheet.PivotTableWizard SourceType:=xlDataBase
SourceData:="'!Quotes 2004' !$a$1:$k$6336"
ActiveWorkBook.ShowPivotTableFieldList = True
[/vb]

Anyone shed any light on this

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Trouble recreating Pivot table changes in VBA

It is much easier to record a macro when making up a pivot table an
amend that as necessary

--
Message posted from http://www.ExcelForum.com

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
Office 2007 and Pivot Table Trouble Erika Excel Discussion (Misc queries) 1 May 30th 09 02:19 AM
Recreating the DateSerial()/Date() function Conan Kelly Excel Worksheet Functions 1 March 1st 08 04:43 AM
RECREATING THE PROBLEM !!!!!!! FC Excel Discussion (Misc queries) 4 March 8th 07 02:43 AM
I am having trouble keeping numbers formatted in a Pivot Table Liana H Excel Discussion (Misc queries) 1 April 22nd 05 07:43 PM
How do I change my DSN without recreating the odbc connection? plato Excel Worksheet Functions 0 January 17th 05 05:01 PM


All times are GMT +1. The time now is 04:37 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"