Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Chart_Activate not running when workbook opened

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default Chart_Activate not running when workbook opened


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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default Chart_Activate not running when workbook opened

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
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
Stop Macros from Running When Workbook Opened via Automation Google Boy of Company C Excel Programming 6 September 15th 05 04:39 PM
Running of a Macro when Workbook is opened Darin Kramer Excel Programming 2 December 14th 04 01:06 PM
Opening a workbook if not opened, going to it if already opened neotokyo[_2_] Excel Programming 1 September 24th 04 07:17 PM
Opening a workbook if not opened, going to it if already opened neotokyo Excel Programming 1 September 24th 04 06:33 PM
How to see if the opened workbook is opened by another user ? balexis Excel Programming 1 August 18th 04 04:11 PM


All times are GMT +1. The time now is 05:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"