Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
anu_manu
 
Posts: n/a
Default pivot table error.Please help! very urgent


ActiveSheet.PivotTableWizard _
SourceType:=xlExternal, _
SourceData:=Array(strSQL, strSQL1), _
tableDestination:=Worksheets(strSheet).Range("a2") , _
tableName:=strSheet, _
RowGrand:=True, _
ColumnGrand:=True, _
SaveData:=True, _
HasAutoFormat:=True, _
BackgroundQuery:=False, _
Connection:=Array(g_strConn)

its giving me an error
"Run-time error 1004 -- Pivot table wizard method of worksheet class
failed."

it also calls verifyPivot name as strPivot =
VerifyPivotName(strSheet).
strsheet is coming up with value "sheet1".

but the function verifypivotname doesnt show it.
Public Function VerifyPivotName(strSheetName As String) As String
Dim nCount As Integer
Dim strPivot As String

nCount = ActiveSheet.PivotTables.Count
ActiveSheet.Range("a2").Select

If nCount 0 Then
strPivot = Worksheets(strSheetName).PivotTables(1).Name
Else
VerifyPivotName = "-99990000"
Err.Raise 2
Exit Function
End If

cud this be a possibility tht i hav to name the pivot table first. if
yes how?
please help .


--
anu_manu
------------------------------------------------------------------------
anu_manu's Profile: http://www.excelforum.com/member.php...o&userid=31510
View this thread: http://www.excelforum.com/showthread...hreadid=511867

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
Derived Columns in Pivot Table sa02000 Excel Discussion (Misc queries) 1 February 8th 06 07:18 PM
Need to Improve Code Copying/Pasting Between Workbooks David Excel Discussion (Misc queries) 1 January 6th 06 03:56 AM
pivot table created from another pivot table Kreed Excel Worksheet Functions 6 October 26th 05 04:16 PM
Change Data In Pivot Table John Calder New Users to Excel 1 July 7th 05 10:41 PM
Pivot Table Problems Rachel Gonsior Excel Discussion (Misc queries) 3 March 21st 05 07:24 PM


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