Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Data In PowerPoint Chart Disappears


I do quite a lot of automation of graphs in PowerPoint from Excel. Occasionally, a chart will look like it has the correct data in, but when you double-click into it, the data reverts back to what was originally in the PPT chart (prior to automation).

I can't really attach my code because it is part of quite a large app. However, the following shows how I am referencing the PowerPoint objects:


Code:
Dim oActiveSlide As PowerPoint.Slide
Dim oObject As Object
Dim oDataSheet As Object

'set reference to graph object and datasheet
Set oObject = oActiveSlide.Shapes(MyShapeName).OLEFormat.Object
Set oDataSheet = oObject.Application.DataSheet

'put data into datasheet
oDataSheet.Cells(2, 2).Value = "2"
'...etc

oObject.Application.Update
oObject.Application.Quit

I am using version 10 of Excel and PowerPoint. Back when we first got version 10 we had a similar problem, but it appeared to be fixed by using Application.Update & Application.Quit after putting data into the chart.

Although this problem only happens occasionally, it seems to be "random" - I can't see any pattern to when it happens, and it is not replicable. Has anyone else come across this problem?

Thanks.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Text Disappears In Chart In VB Report
Helllo, I have a excel file with a chart that I'm trying to imbed into my VB report. (the sheet is actually updated by a macro in the VB)

Everything looks fine in design mode, but when I preview or print the text (legend and values) dissapear. Is this a size issue or Is there another way to get the chart on my report. Thanks!

Using Excel Chart Event Procedures When Embedded In PowerPoint
Hi,

Say I've declared a procedure in Excel, with a chart on a seperate sheet, that msgboxes what the value of the series is when you mouseover it, something like this:

>>



Private Sub Chart_MouseMove(ByVal Button As Long, _
ByVal Shift As Long, ByVal X As Long, ByVal Y As Long)
Dim IDNum As Long
Dim a As Long
Dim b As Long

ActiveChart.GetChartElement X, Y, IDNum, a, b
msgbox IDNum
end sub



>>>.


If I paste this chart into Powerpoint I have not found an easy way to access this prcoedure. I know you can set ActionSettings and I suppose you could call another sub that is given a reference to the shape.oleformat.object, but this seems far too hard.

Any thoughts?

Thanks alot,

Greg

Why Data DisAppears On Enter Event?
hi frds

In Case Of flexgrid or Any Other Grid when We Try To Update Data Of Any Particular Row Without Help Of Mouse Then Data Disappears.

Check Out The Image Which I Attached With this Query.

Query : When I Use Mouse To Update My Name Shakti Then Cursor Blinks At The Last Position Of Shakti And Then I Can Easily Update My Name.
But When I Press Enter Thru KeyBoard To Update My Name Then Cursor Blinks On The First Position Of That Row and My Name Disappears.

Here I Don't Want to use Mouse..........I Want To Use Keyboard In the Same Working style Of Mouse
Is It Possible........

Bound Data Disappears On Edit
Apologies if this is a repeat, but I could not find it...

I have a form with data bound controls - text and combo which are populated from a data environment recordset to a remote SQL Server. I set the recordset source explicitly set in code so it returns one specific record. I am using dynamic/optomistic/client.

When I perform the operation, retrieve a valid record, rebind the controls and then go to edit the current record, each field or combo is in turn, blanked out when I move to the next one. If I cancel, all is well.

My brain hurts - I know this is simple, but I can't see the wood for the trees......

Tony

Accessing The PowerPoint 2003 &"Chart Type > Custom Types&" Screen
Hi there I am wondering if there is a way to programmatically access this screen? When I try and use the macro recorder it stops recording as soon as you select the chart and choose "Edit > Chart Object > Edit" from the toolbar. The reason I need to access this is that I have added a set of custom chart types to the custom screen. These will also need to be shared with other users so if anyone knows anything about that as well I would be most grateful.

Cheers in advance
Glyn



Edited by - glyn_d on 7/18/2005 3:21:11 AM

How To Make A Chart (MS Chart) With Data From A DB????
Hi all,


Can u show me how to have a chart produced from data directly (or indirectly) from a MDB (access2000)???



An example project would be brilliant, or the code???




Please help

Excel 2000, Create Powerpoint Org Chart From Excel.
I want to create a powerpoint org chart from Excel using information held in Excel. I have found how to add an Org chart into Powerpoint but can't find anywhere that tells you how to change the details/options or add Subordinates Managers etc and alter those details.

Anyone have any ideas (I don't want to create seperate text boxes if possible.)

Ps if you can create a good powerpoint org chart from excel, any ideas on the best layout of information in the spreadsheet to work through and create it.

This is one of those, that would be good if you can do it (created them in the past and are time consuming pains), rather than has to be done last week ideas.

Regards.

rob.

Data From Vb To Powerpoint
How can we send some data from the form ie even the controls to a
powerpoint slide thru
code and should be all carried out when the program is executing.

How To Change Source Data In Pie-Chart In Excel According To Runtime Data Through Vb
Is it possible to update the sourcedata (number of rows) for pie-chart in excel application thorugh VB.Ifso please let me know.


Thanks

Is It Possible To Export Data From VB To Powerpoint
Is it possible to export data from VB to Powerpoint

How Do I Integrate Dynamic Data Into Powerpoint
i need to know how to integrate some sort of database into a dynamic powerpoint presentation, whether from an MS Access database, MS Excel worksheet, or a simple text file. It doesn't matter as long as I can have a powerpoint presentation running that pulls data from the database and displays it depending on the date and time. I'm not very experienced in VBA but i really needto figure this out for a little display at a company that should greet visitors with their name and the company's name according to the date/time field in the database record.

Thanks for any help or suggestions,
stk

Pull Data Into PowerPoint From Cgi Script?
Hello all.

I'm working no a project to dynamically update a PowerPoint template file with new data that comes from a web server. I've finally come 'round to this "VBA-pull" solution after looking into many other methods, and after reading several FAQs hewre on vbcity.

Not at all a VBA guy, I've done enough research to have put together
a PPT file with a chart on the first slide, and a VB macro that
can insert new data (hard-coded into the VB) into the chart's data
table. So if I can get new data from outside into the macro, I'm
scot free. (The real project has 100 slides, each with a pie or
bar chart of ~6 data points, in a template file.)

The data is to come from a Perl script on the server. For historical
reasons, the data to be charted comes from plain text files that have to be parsed.

I also have made another macro that will open up an Internet Explorer
window and surf to a specified (again, hard coded) url.

I've seen, but not yet personally implimented, VBA code that can
reference form elements in the html page of the opened IE window.

So, I was imagining opening an IE window and calling the Perl script,
outputting the parsed data to hidden form fields in the IE window's
html page, accessing their values with the VB and updating the charts' data tables.

But there are two remaining issues with this approach:

a)that sounds clumsy to me. It would be much better if VBA could communicate with the cgi script directly without opening an IE window. I see that it can perform SQL queries, how hard can it be to get it to call a cgi script?

b)At the moment the user requests this dynamically generated PPT
file, he has been viewing one data table text file from among thousands.
 The PPT VB needs to know which table he wants charted. I have
that information stored in a hidden form field in the user's browser
window, but I can't guarantee the user is using IE, it could be
Netscape or any other browser. Saying this feature only works with
IE is an option, but only if absolutely necessary.

Any and all advice will be greatly appreciated.

Pull Data Into Powerpoint From Cgi Script Via VBA Macro?
Hello all.

I'm working no a project to dynamically update a PowerPoint template file with new data that comes from a web server. I've finally come 'round to this "VBA-pull" solution after looking into many other methods, and after reading VBA-forum posts mentioning "powerpoint" back a year.

I've done enough research to have put together
a PPT file with a chart on the first slide, and a VB macro that
can insert new data (hard-coded into the VB) into the chart's data
table. So if I can get new data from outside into the macro, I'm
scot free. (The real project has 100 slides, each with a pie or
bar chart of ~6 data points, in a template file.)

The data is to come from a Perl script on the server. For historical
reasons, the data to be charted comes from plain text files that have to be parsed.

I also have made another macro that will open up an Internet Explorer
window and surf to a specified (again, hard coded) url.

I've seen, but not yet personally implimented, VBA code that can
reference form elements in the html page of the opened IE window.

So, I was imagining opening an IE window and calling the Perl script,
outputting the parsed data to hidden form fields in the IE window's
html page, accessing their values with the VB and updating the charts' data tables.

But there are two remaining issues with this approach:

a)that sounds clumsy to me. It would be much better if VBA could communicate with the cgi script directly without opening an IE window. I see that it can perform SQL queries, how hard can it be to get it to call a cgi script?

b)At the moment the user requests this dynamically generated PPT
file, he has been viewing one data table text file from among thousands.
The PPT VB needs to know which table he wants charted. I have
that information stored in a hidden form field in the user's browser
window, but I can't guarantee the user is using IE, it could be
Netscape or any other browser. Saying this feature only works with
IE is an option, but only if absolutely necessary.

Any and all advice will be greatly appreciated.

Using Excel Data To Create Charts In PowerPoint
Is there a way to take values located in Excel and use these values to create a Powerpoint chart?

For example, assume that I have the following info in Excel:
cell B1: 1st Quarter
cell C1: 2nd Quarter
cell A2: AOL
cell A3: MSFT
cell B2: 25
cell C2: 30
cell B3: 10
cell C3: 5

Is there a way to take this information and use it to create a chart in Powerpoint?

If someone knows how to do this, would you please post sample code?

Extract Data From PowerPoint And Input It Into Excel?
Would it be possible to do this?

There are several strings that I need to extract from several presentations. I have the code to open PP from Excel VBA, would it now be possible find specific strings, copy them, then place them into specific cells? COuld this be done with VBA, or will I have to use VB to do this? What would you say the difficulty of this project is?

Thank you

--edit--

Would it be possible to just extract the strings from powerpoint into a database using VBA in PP?

Create Powerpoint Objects Depending On Excel Data
I want to create rectangles on a powerpoint slide. De size of these rectangles must be read from a excelsheet or txt file. I can creat a reactangle with vb, but don't know how to get the excel data.

P.

Chart Only Some Data
Hello All, I have a spreadsheet with data running horizontally. I have buttons to the left of the data to hide the data. The buttons just change the font color to be the same as the background color. We use this to show people only some of the data. What I would like to be able to do is graph only the data that is visible. Any help would be appreciated or just head me in the right direction.

Thanks

Andrew

Two Data In One Chart
I have two data will show on the list1 and list2,I want to use these two data draw mschart.
Here are my code

Code:
Dim i As Integer, j As Integer, k As Integer, l As Integer
Dim plotArr(0 To 10, 0 To 1) As Variant
Dim inp As Integer


If List1.ListCount >= 10 Then List1.RemoveItem 0
List1.AddItem Val(Lbpv1.Caption)
For i = inp To inp + 10
plotArr(j, 0) = "b" & CStr(i)
plotArr(j, 1) = List1.List(i - inp)
j = j + 1
Next
inp = inp + 1
With MSChart1
.Column = 1
.ColumnCount = 2
.RowCount = 10
.ChartData = plotArr
End With

If List3.ListCount >= 10 Then List3.RemoveItem 0
List3.AddItem Val(Lbsp1.Caption)
For k = inp To inp + 10
plotArr(l, 0) = "b" & CStr(k)
plotArr(l, 1) = List3.List(k - inp)
l = l + 1
Next
inp = inp + 1
With MSChart1
.Column = 2
.ColumnCount = 2
.RowCount = 10
.ChartData = plotArr
End With


Lists have no problems,but the error in "column = 2".
Could someone solve my problem? Thank you very much......

Set Chart Data
Hello
my problem is to set another datapoints on the mschart but which is not used in the drawing on the chart, what can i do?. i hope u can understand my question!!!! i do not care about marker here
thanks for advice
if u do not understand my question,please tell me to explain it again to you.


Egyptian Man

Chart Source Data
Is it possible to set the source data of a chart to an external reference / workbook. I have tried the following but to no avail:

Activechart.SetSourceData Source:=Workbooks(FilepathWorkbookName.xls).Sheets ("Data").Range ("A1:Z1"), PlotBy:= xlrows

Can anyone help ?

USing Data To Draw Org Chart
apologies if this has been posted before.

I have a data structure in access, 2 tables, one detailing forms from a 3rd party application, name and title, the other showing the parent child relationships.

I wanted to quickly download an application which would read in these data and draw me an org chart so that we can see the menu structure for testing purposes. (there are 1000's of forms so doing this manually is not an option).

On failing to find anything through google i decided to record some power point macro's whilst inserting an Org chart, changing text, adding nodes etc.

The code I recorded is horrible to read, where i entered data in 3 branches it all appears in the code as one string.

So i tried in excel, with which i am more familiar with VBA, and in excel XP you cannot perform any org chart actions while recording a macro.

so can anybody help me learn to manipulate an org chart object through VB, to send it the data i want it to draw

macro code: i inserted a chart, and entered "Top" in the top level, one, two and three in the 2nd tier and i added a node under three and added "three_1"


Code:
ActiveWindow.Selection.SlideRange.Shapes("Group 5").Select
ActiveWindow.Selection.ShapeRange.GroupItems(Index:=10).TextFrame.TextRange.Characters(Start:=1, Length:=0).Select
With ActiveWindow.Selection.TextRange
.Text = "three_1threetwoonetop"
With .Font
.Name = "Arial"
.Size = 18
.Bold = msoFalse
.Italic = msoFalse
.Underline = msoFalse
.Shadow = msoFalse
.Emboss = msoFalse
.BaselineOffset = 0
.AutoRotateNumbers = msoFalse
.Color.SchemeColor = ppForeground
End With
End With
ActiveWindow.Selection.SlideRange.Shapes("Organization Chart 5").Select

its this bit which confused me:
.Text = "three_1threetwoonetop"

i suppose in the worst case scenario i could do this with a txt string converting the data to a HTML table but would I prefer a nice easy and elegant solution.

Chart Data Manipulation
Hello All,

I've noticed that the charts in Excel allow the user to move the data points, thus changing the data points (so long as they are not formulas). I tried to add the Microsoft Chart version 11 control to a form in VBA, but when the form is loaded, it doesn't seem to be possible to move the points. Is there any way of implementing a chart so that the user changes the data points by dragging?

Also, I can't find the datagrid control in VBA, though it avaiable in .NET. Where is it?

Thanks

Any Way To Extract The Data From A Chart?
I have a chart in ppt, I would like to extract the values form the chart and place them into a spread sheet. I have everything down except, how would I go about extracting the data elements from the chart?

Pull Data In Chart
URGENT!!

Just wrote a macro that
1) deletes the existing column chart
2) creates a new chart with one data entry
3) updates the chart by pulling additional input data into the chart. Both the chart and the input data are located on the same sheet.
The program is running.
If I want to apply the same macro on a different sheet in the same workbook by only adjusting some data ranges and sheet/workbook names a weird error occurs:
"Run-time error '5': Invalid procedure call or argument"

The debugger flags the following line of the source code:

ActiveChart.Location Where:=xlLocationAsObject, Name:="Total Amount of Claims per Year"

Despite the above line, the new chart is inserted on a new sheet. It should be inserted on the same sheet that contains the input data. Do I have to put in "other words". It seems that there is no logical and semantically mistake.

Here is a part of the source code including the critical line:

'create chart
Range("A1").Select
Charts.Add
ActiveChart.ChartType = xlColumnStacked
ActiveChart.SetSourceData Source:=Sheets("Total Amount of Claims per Year").Range("B2"), PlotBy:= _
xlRows
ActiveChart.SeriesCollection(1).XValues = "='Total Amount of Claims per Year'!R1C2"
ActiveChart.Location Where:=xlLocationAsObject, Name:="Total Amount of Claims per Year"
With ActiveChart
.HasTitle = True
.ChartTitle.Characters.Text = "Total Amount of Claims per Year"
.Axes(xlCategory, xlPrimary).HasTitle = False
.Axes(xlValue, xlPrimary).HasTitle = False
End With

I appreciate any advice or question as this is a really urgent project.
Thank you.

Extrapolating Data From A Chart
Hi,

I need help in extrapolating data from varying XYScatterline curves generated in charts I created. For example, on my y-axis is probability an event will occur and my x-axis is vehicle speed. I need to extrapolate the vehicle speed value at the 70%, or .70, probability line the event will occur. Is there a way to program this being that the data points in my range of my chart may not be equal to .70 but the curves generated cross the .70 line? I would truly appreciate any help! Thank you!

Take Data And Create Pie Chart?
My code is pretty good so far with what I'm trying to do, but now I would like to take the data I'm sending to excel and create a pie chart on the worksheet to give a graphical representation of how time is spent.

The code dumps 3 values out into 3 colums... Hour, Minute, and Second

How can I create a pie chart in VB to do this?

My code so far is:


Code:
Private Sub Command4_Click()
If Command1.Caption = "Start" Then
Dim oExcel As Excel.Application
Dim oWB As Excel.Workbook
Dim oWS As Excel.Worksheet

Set oExcel = New Excel.Application
Set oWB = oExcel.Workbooks.Add
Set oWS = oExcel.ActiveSheet
oExcel.Visible = False
oExcel.DisplayAlerts = False

oWS.Cells(1, 1) = "Total Time in Production"
oWS.Cells(1, 2) = Hour(TotalInterval1) & " Hours"
oWS.Cells(1, 3) = Minute(TotalInterval1) & " Minutes"
oWS.Cells(1, 4) = Second(TotalInterval1) & " Seconds"

oWS.Cells(2, 1) = "Total Time in Scrap"
oWS.Cells(2, 2) = Hour(TotalInterval1) & " Hours"
oWS.Cells(2, 3) = Minute(TotalInterval1) & " Minutes"
oWS.Cells(2, 4) = Second(TotalInterval1) & " Seconds"

oWS.Cells(3, 1) = "Total Time Purging"
oWS.Cells(3, 2) = Hour(TotalInterval1) & " Hours"
oWS.Cells(3, 3) = Minute(TotalInterval1) & " Minutes"
oWS.Cells(3, 4) = Second(TotalInterval1) & " Seconds"

'Cleanup
On Error Resume Next
oExcel.DisplayAlerts = False
oWS.SaveAs "C:Test" & Month(Date) & Day(Date) & Year(Date)
Call oWB.Close(SaveChanges:=False)
Set oWB = Nothing
oExcel.Quit
Set oExcel = Nothing

Else
MsgBox "You must stop the program before saving data."
End If

End Sub

Create Pdf Chart With DB Data
Hello, anyone know of a component i can use to create PDF line charts with data from a DB?
Right now i can create an image (.png,.jpg,etc...) file from a charting tool and then, i can embed that into a pdf with some pdf software out there.
But i would like to get rid of the part where i create the image file. I would like to grab the data from the DB and stream it to a pdf component that will directly chart the line chart in pdf.

Thanks!
laura

Data Labels On Pie Chart
I am creating an add-in that will generate pie charts automatically.

Each cell among the range used to build the chart has a title in the cell immediately above it. I would like to label the pie chart with these labels. I would prefer to use the Legend. But I'm not sure how to do this. Thanks in advance.

I Want Some Example! {display Data In Chart}
I want to display my measured data,such(x,y) on the form one by one,just as a real time chart ,who can help me !

Thank you in advanced!!

Chart Data = 0 = Problems
I'm having strange problems when working with mschart : if the data is 0 it shows up the following error message "bad function argument". But in other programs i did, it had 0 datas but it worked.

Maybe i'm missing some property ?

Thanks for helping !

Create Pdf Chart With DB Data
Hello, anyone know of a component i can use to create PDF line charts with data from a DB?
Right now i can create an image (.png,.jpg,etc...) file from a charting tool and then, i can embed that into a pdf with some pdf software out there.
But i would like to get rid of the part where i create the image file. I would like to grab the data from the DB and stream it to a pdf component that will directly chart the line chart in pdf.

Thanks!
laura

Column Of Data To Chart
Hello
I'm trying to send a column of data from a flexgrid to MSChart to plot. But, with this code all I get is the last entry of the first column. This number is the same across the chart x-axis. So the chart has a straight line left to right.

I wanted all the values of the single column plotted. My chart has years as the x-axis and amount as the y-axis.

Code:
For iRowCount = 1 To tempview1.MSFlexGrid1.Rows - 3
For iColumnCount = 1 To 12
' assign a FlexGrid cell's data to dCurrData
dCurrData = tempview1.MSFlexGrid1.TextMatrix(iRowCount, iColumnCount) ' replace this line?
With MSChart1
.ColumnCount = 1
.Column = iColumnCount
.Row = iRowCount
.RowCount = tempview1.MSFlexGrid1.Rows -2
.Column = iColumnCount
.Data = dCurrData
.enabled = True
End With
Next iColumnCount
Next iRowCount

Data Flexgrid To Chart
How do I put the data of a flexgrid into a chart..

searched but didn't found anything...

Pivot Chart Data
I apolgize in advance for the following question.

I have an error in all my Excel pivot tables that started 8/6/05 for no apparent reason:

"Client Safety Options do not allow pass through statements to be issued to the data source"

I have been designing and running these OLAP cubes for alomst a year and just got this error. A search of the web found a thread here somewhere but I can't find it.

Any pointers? Please.

Column Of Data To Chart
Hello
I'm trying to send a column of data to MSChart to plot. But, with this code all I get is the last entry of the first column. This number is the same across the chart x-axis. So the chart has a straight line left to right.

I wanted all the values of the single column plotted. My chart has years as the x-axis and amount as the y-axis.
Code:
 iRowCount = 1 to tempview1.MSFlexGrid1.Rows - 2
     For iColumnCount = 1 To 12
             For iRowCount = 1 To tempview1.MSFlexGrid1.Rows - 3
            ' assign a FlexGrid cell's data to dCurrData
            dCurrData = tempview1.MSFlexGrid1.TextMatrix(iRowCount, iColumnCount)
            With MSChart1
                 .ColumnCount = 1
                 .Column = iColumnCount
                 .Row = iRowCount
                 .RowCount = tempview1.MSFlexGrid1.Rows -2
                 .Column = iColumnCount
                 .Data = dCurrData
                 .enabled = True
            End With
       Next iColumnCount
Next iRowCount




Edited by - codeblue on 9/17/2005 12:35:49 PM

Chart From ListBox Data
Hello all! I would like to create a chart into a VB .NET application by taking the data from a ListBox. Please help!!!

Thank you

Data Report And Chart
I want to show some data from the database in the form of charts in data report.
There seems to be no control avilable for doing so in data report designer at design time!
Is There any way how I can overcome this problem?
Is it possible to use Crystal Reports' tools in VB without installing it?
Reply.
This is a bit urgent.

Excel Data Into Chart, Confusing?
I have three forms, each assigned a worksheet of a workbook. A button (Graph1) on each form reads the data from the required sheet and plots it with a minimum and max values (also in the sheet). Three other buttons allow the user to flick between each form (ie Form1, Form2, Form3.) If I am in Form1 I can see the chart and the plotted graph. If I click to go to Form2 and click Graph1 all the data changes (max and min values, chart headings, legends as it should etc) BUT it still plots the data range from the Form1 graph. Why?

Is there anyway to clear the data from the Form1 graph when going to Form2?

Cheers for any help.

Extract Data From An Excel 3D Chart
Hi,
I'm using an Excel 3D chart to display my series of data (which are very classical, each buble is a serie composed of: Name - X - Y - Bubble Size).
When I display this chart, I would like to be able to open a small window (message box, userform?) when I click on a bubble.
This small window must contain informations about the Name of the clicked serie and "external" datas (which are not related to the chart serie but to a specific cell).

Do you have any idea ?

THX

Excel Chart Data Range
I have a spreadsheet with data in Column A and I chart that data. Does anyone know how to make it so that chart will adjust the data range to compensate when more or less data is in the column?

Importing Data Into An Excel Chart
Hi All,

I have inserted an Excel chart into my user interface and have configured it to show X Y data. Can anybody tell me which commands or properties must be used to import data I have just acquired and written to an Excel file and to update the chart.
I am not a complete beginner but I have had no success with this up to now. OLE is new to me.
Would be very grateful.

Data Analysis And Chart Production
Hi i have a workbook containing five sheets, one of the sheets called enquires contains all of the enquires taken by the company and contains columns such as customer name, customer reference, quote etc.

One column in particular is called "Period Quoted" and is an integer value from 1 - 12 depending on what month the record was added. Each row represents a new quote or record.

Now what I would like to do is reference this column and go through each row recording the number of each period (i.e record the total number of 1's, 2's,3's.... and add the final results into a bar chart, with a bar for each period showing the totals.

Ive tried coming up with some pseudocode.

Select colum i
loop while row is not empty
if value = 1 then one_total = one_total + 1
if value = 2 then two_total = two_total + 1
And so on
End loop
Populate bar chart using relevant values.

Am I on the right track?

And if so, how do I loop through column i until I get to the end (i.e an empty row)?

I also dont know how to create a chart but I think I should concentrate on the code to extract the totals first.

Any help would be appreciated, Thanks Ryan.

How To Get A Chart's Source Data Range?
I want to be able to select a chart and run a macro which would refer to some data adjacent to the source data (to colour the bars appropriately). So I need to get the source data range. I can get the data values, but not the range. Can anyone help?

Excel Chart Source Data
Hi, I have a macro that does a number of things quite happily. From the completed data I have a chart which up until now I have been amending manually to allow for the increased size of the source data.

I want to amend the macro to automatically increase the size of the source data area covered as the size of the source data increases.

Using this forum and Excel help files I've added the SetSourceData method, the following works perfectly well with a defined cell range:

Charts(1).SetSourceData Source:=Sheets(1).Range("a1:a10"), PlotBy:=xlColumns

I need the second cell range (a10) to be set by a variable so that it can increment but can not get it to work. I get all sorts of error messages. The "cellref" variable is built quite happily using a variant type but I can not get it to work within the SetSourceData method.

Charts(1).SetSourceData Source:=Sheets(1).Range("a1:cellref"), PlotBy:=xlColumns

Any help is appreciated.

Bolding Data In An Pivot Chart
Hi,

I have written vb code to generate a pivot chart from data collected over several years ('99-'07).
This chart shows the change of business expenses over the time period.
I would like to black and heavily weight the most recent year (in this case '07, but this will change with each new year), so that it stands out.
I have used the macro recorder to do this but am worried, once '08 starts, the code will not know to recognize the new year. It will continue to black and heavily weight '07 but i need it to black and heavily weight the most recent year ('08).

I really am stuck and would appreciate any thoughts or ideas. As I mentioned above i've tried the macro recorder but i think the vb needs to be advanced and i'm not sure how to solve this problem.

Thanks very much.

Data Label Position In Pie Chart
I have to reposition the datalabel in pie chart for which I have written followin piece of code:
With .SeriesCollection(0).DataLabelsCollection.Add

.HasValue = False
.HasPercentage = True
.HasCategoryName = True
.Position = chLabelPositionInsideEnd
.Separator = "-"

End With
.Position = chLabelPositionInsideEnd
But their is no effect.Help

Data Base Flow Chart
Does anyone here know of a place that would have a flowchart/article on how a server client system processes/transmits information?

How To Represent Data In Gnatt Chart (VB6.0/.net)
How to Represent data in Gnatt Chart using VB6.0/ dot net. I don't have any activex control. If any of you knows please tell me.

sk

Preparing Chart From Array Data
Hello,
Are there any dlls that come with windows that can be used to prepare charts??
Meanwhile I'm trying to figure out how to work with MSChart control..

I need to get data from 2 separate arrays as input for X and Y coordinates to prepare graphs

the equation y =mx+c..
'm' is found to be negative 1.00000000

Now the MyArrayX() and MyArrayY() values must be plotted in a graph to chk if it gives a -ve curve..

Copyright 2005-08 www.BigResource.com, All rights reserved