LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Geeting error while setting datalabels through VBA

Hi,
I have this piece of code

ActiveSheet.ChartObjects("Chart 5").Activate
ab = ActiveChart.SeriesCollection(1).DataLabels.Count
Debug.Print "count", ab
lup = 10
With ActiveChart.SeriesCollection(1)
For a = 2 To ab
.DataLabels(a).Caption = Range("A" + CStr(lup)).Value
lup = lup + 1
Next
End With

It is giving RunTime error 1004 on line .DataLabels(a).Caption = Range("A"
+ CStr(lup)).Value

Whereas this code is running fine on all the other charts. Any clue why?

TIA


 
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
Geeting Sheet background from Excel object model Sheela Excel Discussion (Misc queries) 3 September 4th 08 01:40 PM
Avoid geeting function GETPIVOTDATA Gunnar Sandström Excel Discussion (Misc queries) 2 January 18th 06 01:19 PM
Excel Chart Datalabels Sean Howard Excel Programming 6 April 20th 04 12:04 AM
Datalabels on Scatter Daniel Bonallack[_2_] Excel Programming 1 September 15th 03 10:23 PM
Converting DataLabels to Numbers Dan Gesshel Excel Programming 1 August 1st 03 04:34 AM


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