473,387 Members | 1,530 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

MSGraph.Chart 8.0 Modification

Can someone tell me how to change a single legend entry from a Stacked
Bar Chart to a Line Chart. All the rest need to stay at a Stacked Bar
Chart. Line 50 on the below code is what needs to be changed.

Thanks

*****************************************
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
1 On Error GoTo Err_dF
5 Dim chr As Graph.Chart
10 Dim j As Integer
15 Dim X As String
20 Set chr = myChart.Object
25 With chr.Legend
30 j = .LegendEntries.Count
35 For i = 1 To j
40 X = .Application.DataSheet.Cells(i + 1, 1)
45 Select Case X
Case "Actual"
50 .LegendEntries(i).LegendKey.Interior.Color = 0
Case "PM/Engr."
55 .LegendEntries(i).LegendKey.Interior.Color =
32768
Case "Equip"
60 .LegendEntries(i).LegendKey.Interior.Color =
65535
Case "Matl"
65 .LegendEntries(i).LegendKey.Interior.Color =
16711680
Case "Merit"
70 .LegendEntries(i).LegendKey.Interior.Color =
39423
Case "JEG_SC"
75 .LegendEntries(i).LegendKey.Interior.Color =
255
Case "BPMISC"
80 .LegendEntries(i).LegendKey.Interior.Color =
16763904
Case "BP_SC"
85 .LegendEntries(i).LegendKey.Interior.Color =
13209
Case "Conting"
90 .LegendEntries(i).LegendKey.Interior.Color =
16751052
Case "UN"
95 .LegendEntries(i).LegendKey.Interior.Color =
RGB(255, 255, 255)
100 End Select
105 Next
110 End With
Exit_dF:
115 Exit Sub
Err_dF:
120 If Err.Number = 1004 Then
125 Resume Next
130 Else
135 MsgBox Err.Number & " " & Err.Description & chr(13) &
chr(10) & "Detail Format Line No: " & Erl
140 Resume Exit_dF
145 End If
End Sub
Nov 13 '05 #1
0 3212

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Anthony Cuttitta Jr. | last post by:
We have an application that outputs several different graphs from data downloaded from our AS400. The application has worked without (this) issue for several months now, but just recently, the...
1
by: Andre Kristoffersen | last post by:
Hi! I have found the MSGraph object very easy to use in Access if you use it in a straightforward manner. Just by changing the object rowsource ( I use sql), the graph changes accordingly. ...
22
by: PeteCresswell | last post by:
I've been to http://msdn.microsoft.com/library/default.asp?url=/library/en-us/mschrt/html/vbobjtitleobject.asp, but still don't have a clue. For example, I've got a chart object namde...
1
by: ian.davies52 | last post by:
I have an msgraph on a form. The chart has five series on it. On the same form I have five checkboxes. I'm trying to make it so that checking/unchecking a checkbox will result in each of the series...
6
by: Scott | last post by:
I have a unbound MS graph object built as a pie chart that I set to a value list and I am updating programatically. Everything works except that the graph does not repaint except for when the...
5
by: grant | last post by:
I'm trying to use a scatter chart to plot level reading for a pump station level sensor. The sensor takes a reading every 4 seconds, and there are 23,000 reading per chart There appears to be...
0
by: blurbology | last post by:
I have a word document that contains a Graph (MSGraph). I am trying to update the Chart's datasheet with new values, but I cannot seem to get the correct reference for the chart object. What I am...
0
by: G Gerard | last post by:
Hello I have a graph in a report that is has the following properties: OLE Class - Microsoft Graph 2000 Chart Class - MSGraph.Chart.8 On some computers this graph does not work. I suspect...
2
by: LucasLondon | last post by:
Hi, I'm trying to use VBA to extract underlying data from charts in powerpoint to excel, i.e from the underlying powerpoint datasheet that feeds the chart. I've found the macro below on the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.