Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default Using Events with Embedded Charts

Hi
While looking at help for "Using Events with Embedded Charts" I got terribly confused.My understanding of Object Oriented concept says that any instance of a class is an object- we create a class and then create its instance
Its says create a class module called "EventClassModule" but no where in the example there is a statement of how to create it
I am confused about thses things-Please clarif
1) Is class module treated same object in Excel
2) Why do we create myClassModule and myChartClass

I have quoted from the help below
Events are enabled for chart sheets by default. Before you can use events with a Chart object that represents an embedded chart, you must create a new class module and declare an object of type Chart with events. For example, assume that a new class module is created and named "EventClassModule." The new class module contains the following code

Public WithEvents myChartClass As ChartAfter the new object has been declared with events, it appears in the Object drop-down list box in the class module, and you can write event procedures for this object. (When you select the new object in the Object box, the valid events for that object are listed in the Procedure drop-down list box.

Before your procedures will run, however, you must connect the declared object in the class module with the embedded chart. You can do this by using the following code from any module

Dim myClassModule As New EventClassModul

Sub InitializeChart(
Set myClassModule.myChartClass =
Worksheets(1).ChartObjects(1).Char
End SubAfter you run the InitializeChart procedure, the myChartClass object in the class module points to embedded chart one on worksheet one, and the event procedures in the class module will run when the events occur

Thank
Shilps
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
Print embedded charts from several sheets Steve Charts and Charting in Excel 1 October 4th 06 03:17 AM
Displaying graph and charts on events soteman Excel Discussion (Misc queries) 0 July 10th 06 08:15 PM
embedded charts Steve Root Charts and Charting in Excel 0 May 30th 06 03:38 PM
Pasting worksheet with embedded charts FishMan Charts and Charting in Excel 2 October 5th 05 02:26 PM
noting events on charts Papa Jonah Charts and Charting in Excel 1 December 17th 04 03:02 AM


All times are GMT +1. The time now is 01:34 AM.

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

About Us

"It's about Microsoft Excel"