Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi. I have this code entered for one of my charts:
Private Sub Chart_Activate() 'update pivot table when chart becomes active UpdatePivotTables Module1.UpdateDataLabels End Sub This works fine. It executes everytime I click the chart's tab. The problem I'm having is that if this chart is current when I first open the workbook, the code does not run until I leave the chart then click back to it. How can I get the chart updated if it is current when I open the workbook? Thanks! Ken |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Private Sub Workbook_Open() ThisWorkbook.Sheets("chartstab").Activate End Sub schreef in bericht oups.com... Hi. I have this code entered for one of my charts: Private Sub Chart_Activate() 'update pivot table when chart becomes active UpdatePivotTables Module1.UpdateDataLabels End Sub This works fine. It executes everytime I click the chart's tab. The problem I'm having is that if this chart is current when I first open the workbook, the code does not run until I leave the chart then click back to it. How can I get the chart updated if it is current when I open the workbook? Thanks! Ken |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Private Sub Workbook_Open()
ThisWorkbook.Worksheets(1).Activate ThisWorkbook.Sheets("chartstab").Activate End Sub - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "moon" <6369706865725F6475646540706C616E65742E6E6C wrote in message . .. Private Sub Workbook_Open() ThisWorkbook.Sheets("chartstab").Activate End Sub schreef in bericht oups.com... Hi. I have this code entered for one of my charts: Private Sub Chart_Activate() 'update pivot table when chart becomes active UpdatePivotTables Module1.UpdateDataLabels End Sub This works fine. It executes everytime I click the chart's tab. The problem I'm having is that if this chart is current when I first open the workbook, the code does not run until I leave the chart then click back to it. How can I get the chart updated if it is current when I open the workbook? Thanks! Ken |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Stop Macros from Running When Workbook Opened via Automation | Excel Programming | |||
Running of a Macro when Workbook is opened | Excel Programming | |||
Opening a workbook if not opened, going to it if already opened | Excel Programming | |||
Opening a workbook if not opened, going to it if already opened | Excel Programming | |||
How to see if the opened workbook is opened by another user ? | Excel Programming |