Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Code Will Not Run
I have a simple workbook that contains a pivot table worksheet. On that
worksheet I inserted the following code: Private Sub Worksheet_SelectionChange(ByVal Target As Range) ActiveSheet.PivotTables(2).PivotCache.Refresh End Sub It does not work. It does not appear to be executing at all. When excel opens the workbook, I do not get a warning about macros. How do I fix this to get the code to run? S. Jackson |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Code Will Not Run
I just realized that I had the code wrong and changed it, but the code will
still not run. It will run just fine on the sample TimeChart.xls file I downloaded from http://www.contextures.com/excelfiles.html#Pivot Here is the code I have on the worksheet containing the pivot table (fyi, the source table is on a different sheet): Private Sub Worksheet_Activate() ActiveSheet.PivotTables(1).PivotCache.Refresh End Sub "S Jackson" wrote in message ... I have a simple workbook that contains a pivot table worksheet. On that worksheet I inserted the following code: Private Sub Worksheet_SelectionChange(ByVal Target As Range) ActiveSheet.PivotTables(2).PivotCache.Refresh End Sub It does not work. It does not appear to be executing at all. When excel opens the workbook, I do not get a warning about macros. How do I fix this to get the code to run? S. Jackson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
split post code (zip code) out of cell that includes full address | Excel Discussion (Misc queries) | |||
Drop Down/List w/Code and Definition, only code entered when selec | Excel Worksheet Functions | |||
Create a newworksheet with VBA code and put VBA code in the new worksheet module | Excel Programming | |||
stubborn Excel crash when editing code with code, one solution | Excel Programming | |||
option buttons run Click code when value is changed via VBA code | Excel Programming |