Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default setting font and other properties for datalabels

I am having problems with my code that automates Excel 03 when applied to
Excel 07. The problem is in charting.

I use the following code (used in many prior versions of Excel) to set the
datalabels in an Excel chart that was created successfully:

oExcel.ActiveChart.SeriesCollection(1).DataLabels. Select

This line works fine in 03, but is coughing up an error €śData Type Mismatch
Expecting Object€ť when run in Excel 07 (the chart itself does get constructed
successfully in 07). I checked and ActiveChart and SeriesCollection(1) are
defined objects, but Datalabels returns as empty and must be causing the
error since it cannot be selected.

I tried:
oExcel.ActiveSheet.ChartObjects("Chart 1").activate
oExcel.ActiveChart.SeriesCollection(1).DataLabels. Select

Which appears to be how a recorded macro would do it, but still the same
error message.

Anyone have a solution to this or even any ideas on what I might try.

Many thanks for any and all ideas,
Mark


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
Setting font properties using function Rod[_2_] Excel Programming 6 January 2nd 10 08:46 AM
how to change font size of datalabels of two charts in a sheet amrezzat[_28_] Excel Programming 1 May 9th 06 01:11 AM
how to change font size of datalabels of two charts in a sheet amrezzat Charts and Charting in Excel 1 May 9th 06 01:04 AM
Geeting error while setting datalabels through VBA Shilps[_2_] Excel Programming 0 November 4th 04 07:20 AM
Setting Font properties in Code clears Undo list Lorin Excel Programming 2 July 10th 03 09:49 PM


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