Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 336
Default Comparing charts after cut and paste

Hi,

I am currently wrting a part of an add-in that dynamically charts data
within a worksheet which changes depending on a users actions. Everything
works fine until the chart object is cut and pasted. When this happens my
object loses the chart object and there seems to be no way of identifying the
newly pasted chart as being the same as the one that was cut. The chart name
is changed (for instance from "chart 1" to "chart 2"), so that can't be used
as a comparison, and i can't find any other properties which would be
suitable.

Anyone got any suggestions?

Many Thanks
Martin
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,163
Default Comparing charts after cut and paste

Can you show the code where you do the cut and paste (and the object variable
Dim statements would be helpful also)

"Martin" wrote:

Hi,

I am currently wrting a part of an add-in that dynamically charts data
within a worksheet which changes depending on a users actions. Everything
works fine until the chart object is cut and pasted. When this happens my
object loses the chart object and there seems to be no way of identifying the
newly pasted chart as being the same as the one that was cut. The chart name
is changed (for instance from "chart 1" to "chart 2"), so that can't be used
as a comparison, and i can't find any other properties which would be
suitable.

Anyone got any suggestions?

Many Thanks
Martin

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 336
Default Comparing charts after cut and paste

Sorry i probably wasn't very clear with my initial post - i mean if the user
cuts and pastes as per usual, for instance cuts a chart and pastes it to
another sheet in the workbook. I would then want to be able to search for
that chart - but at the moment i cannot see a way of identifying it as the
chart that my original object held.

Here is how I set up my object:
Dim oChartObj As ChartObject
Dim oGridChart As XL3GridChartLib.GridChart

Set oGridChart = New XL3GridChartLib.GridChart
Set oGridChart.ChartObject = oGridChart.Sheet.ChartObjects.Add(200, 3, 280,
175)

the gridchart object then does a bunch of stuff to get all the data it needs

"K Dales" wrote:

Can you show the code where you do the cut and paste (and the object variable
Dim statements would be helpful also)


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
Comparing values of two charts Mr BT[_5_] Excel Worksheet Functions 0 November 18th 09 11:59 PM
Stacked Charts Comparing 2 Years On 2 Different Sheets jstidsto Excel Discussion (Misc queries) 2 May 5th 09 03:39 AM
Charts and Line Graphs comparing companies with different data Joyous412 Charts and Charting in Excel 1 January 31st 06 02:44 AM
Charts comparing data Desmond Charts and Charting in Excel 2 December 16th 05 01:11 PM
Comparing charts dynamically Fysh Charts and Charting in Excel 3 December 16th 04 09:02 PM


All times are GMT +1. The time now is 01:15 PM.

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"