Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
dravon
 
Posts: n/a
Default Converting Macro to Perl - charting help

I have a functioning macro which selects a chartobject, modifies the
various values, and moves to the next chartobject. I'm trying to
convert this macro to perl but am not having any luck. I can get the
perl script to select the chartobject, but from there it can't seem to
associate the modified values with the chartobject which has been
activated. Any suggestions??

$Excel-Sheets('Charts')-ChartObjects('Chart 1')-Activate();
my $Chart = $Excel-Charts-Open-ChartObjects('Chart 1');
$Chart-ChartArea-Select();
$Chart-SeriesCollection(1)-{Values} = '';
$Chart-{HasTitle} = 1;
$Chart-ChartTitle-Characters-{Text} = '';
$Chart-ApplyDataLabels-{ShowValue};
$Chart-SeriesCollection(1)-Border-{LineStyle} = xlNone;
$Chart-SeriesCollection(1)-Interior-{ColorIndex} = 39;
$Chart-SeriesCollection(1)-DataLabels-Font-{Size} = 8;
$Excel-Sheets('Charts')-ChartObjects('Chart 2)-Activate();
my $Chart = $Excel-Charts-Open-ChartObjects('Chart 2');
(etc)

It's that my $Chart line which constantly blows up - all the other
lines work if I'm trying to create a new chart. The line from the
functioning version of this full script is "my $Chart =
$Excel-Charts-Add;" ... but now I want to edit or open or modify an
existing chart object, not add a new chart.

I've tried probably 150 permutations of this one line, but since I'm
not a real perl programmer, I'm just doing this by the "hunt and peck"
method of testing various values to see if anything works. Any
suggestions for this programming-challenged brain?

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
macro with F9 Kenny Excel Discussion (Misc queries) 1 August 3rd 05 02:41 PM
Make Alignment options under format cells available as shortcut dforrest Excel Discussion (Misc queries) 1 July 14th 05 10:58 PM
converting Lotus 123 macro to Excell macro mark h Excel Discussion (Misc queries) 6 July 11th 05 01:28 PM
Macro Charting CaliberX Charts and Charting in Excel 1 June 23rd 05 12:39 AM
Playing a macro from another workbook Jim Excel Discussion (Misc queries) 1 February 23rd 05 10:12 PM


All times are GMT +1. The time now is 02:08 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"