Solved

HELP !!!MSGraph Help

Posted on 1998-11-19
1
428 Views
Last Modified: 2008-02-26
When using MSCHART how do I create a pie graph exactly for 100 percent and a bar graph with only 5 different bars with its legend.
0
Comment
Question by:dipen
1 Comment
 
LVL 12

Accepted Solution

by:
mark2150 earned 150 total points
ID: 1445727
A 100% pie graph is a closed circle!

MSCHART has many drawbacks including being more-or-less impossible to print. Draw your own bars and such. Here is an example showing a double barchart for disk free space

'
With MSChart1
'
' Set up basic barchart
'
        .chartType = VtChChartType2dBar
        .Row = 1
        .ColumnCount = 0
                disksize = (insert your data here)
                diskfree = (ditto)
'
                    .ColumnCount = .ColumnCount + 1
                    .Column = .ColumnCount
                    .ColumnLabel = UCase$(Drive1.List(Drive)) + vbCrLf + LTrim$(Str$(Int(diskfree / disksize * 1000 + 0.5) / 10)) + "% " + LTrim$(Str$(Int(diskfree / 1000000))) + "/" + LTrim$(Str$(Int(disksize / 1000000))) + "Mb"
                    .Data = Int(diskfree / disksize * 1000 + 0.5) / 10
'
        .Refresh
    End With
'

0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question