Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
A code snippet:
Function FillYearMonth(ByVal theWorkbook As String, ByVal theWorkSheet As String, _ ByVal thePivotTable As String, ByVal thePageField As String) Dim ws As Worksheet Set ws = Worksheets(theWorkSheet) Dim pt As PivotTable Set pt = ws.PivotTables(thePivotTable) Dim pf As PivotField Set pf = pt.PageFields(thePageField) Dim lb As ListBox Set lb = Worksheets(theWorkSheet).lstYearMonth Call FillListBox(pf, lb) End Function I keep getting error 1004 after executing the line Set pf = pt.PageFields(thePageField) Can anyone point me what is wrong in this code? -- Amedee |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
error 1004 (VBA) | Setting up and Configuration of Excel | |||
error 1004 (VBA) | Excel Discussion (Misc queries) | |||
Run time error 1004, General ODBC error | New Users to Excel | |||
Runtime error '1004' General ODBC error | New Users to Excel | |||
Excel 2003 Macro Error - Runtime error 1004 | Excel Discussion (Misc queries) |