Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Matthew,
The red is where the issue is Reading plain text NG posts, in common with most contributors to the NG) I am unable to see your 'red' data. Please, therefore, post the single offending line and describe the reported error. --- Regards, Norman "matthewwookie" wrote in message news:matthewwookie.1vyyug_1127743529.5308@excelfor um-nospam.com... Hi heres the code Sub ActIssuedIso() ' ' ActIssuedIso Macro ' Macro recorded 26/09/2005 by bbnr843 ' ' Range("G9:G2145").Select Range("C8:U2145").Sort Key1:=Range("G9"), Order1:=xlAscending, Header:= _ xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal Range("C9").Select ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatab ase, SourceData:= _ "Sheet1!R8C3:R1007C21").CreatePivotTable TableDestination:="", TableName:= _ "PivotTable1", DefaultVersion:=xlPivotTableVersion10 ActiveSheet.PivotTableWizard TableDestination:=ActiveSheet.Cells(3, 1) ActiveSheet.Cells(3, 1).Select With ActiveSheet.PivotTables("PivotTable1").PivotFields ("YearMonth") Orientation = xlRowField Position = 1 End With Range("A8:A10").Select ActiveSheet.PivotTables("PivotTable1").PivotFields ("YearMonth").PivotItems( _ "200510").Position = 3 ActiveSheet.PivotTables("PivotTable1").PivotFields ("YearMonth").PivotItems( _ "200511").Position = 4 ActiveSheet.PivotTables("PivotTable1").PivotFields ("YearMonth").PivotItems( _ "200512").Position = 5 ActiveSheet.PivotTables("PivotTable1").AddDataFiel d ActiveSheet.PivotTables( _ "PivotTable1").PivotFields("Count"), "Sum of Count", xlSum With ActiveSheet.PivotTables("PivotTable1").PivotFields ("Priority Status") Orientation = xlColumnField Position = 1 End With Range("F12").Select Charts.Add ActiveChart.SetSourceData Source:=Sheets("Sheet6").Range("F12") ActiveChart.Location Whe=xlLocationAsNewSheet ActiveChart.PlotArea.Select ActiveChart.HasDataTable = True ActiveChart.DataTable.ShowLegendKey = True The red is where the issue is...range f12 is the location of the last cell clicked on before i left that page! Any help would be great. if you need anything else please just let me know. matt End Sub -- matthewwookie ------------------------------------------------------------------------ matthewwookie's Profile: http://www.excelforum.com/member.php...o&userid=27503 View this thread: http://www.excelforum.com/showthread...hreadid=470711 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
error message: compile error, argument not optional | Excel Programming | |||
VBA Error Message "Compile Error...." | Excel Discussion (Misc queries) | |||
Excel XP error message Run Time Error 91 | Excel Programming | |||
changing the message in an error message | Excel Worksheet Functions | |||
How do I get rid of "Compile error in hidden module" error message | Excel Discussion (Misc queries) |