Solved

Chart defaults to Bar Chart

Posted on 2004-10-22
568 Views
Last Modified: 2013-12-26
I am using the ChartTypeData=xlLIne in my code still the plotted chart defaults to bar chart.
This is the code.

Set DataSheet = Sheets("Trial" & i).Select
With DataSheet
Set CatTitles = .Range(.Cells(2, 3), .Cells(row, 3))
Set SrcRange = .Range(.Cells(2, 2), .Cells(row, 2))
End With

Set SourceData = Union(CatTitles, SrcRange)

Sheets("Plot").Select
With ActiveChart.SeriesCollection.NewSeries
.ChartType = xlLine
.setSource DateSource:=SourceData, PlotBy:=xlRows
End With


Please help, I want to plot a range on graph as xlLine.

Thank you.
0
Question by:Aiysha
    2 Comments
     
    LVL 26

    Accepted Solution

    by:
    May be just


    ActiveChart.ChartType = xlLine
    0
     
    LVL 8

    Expert Comment

    by:bramsquad
    this is what i use in vb.net

    With ExcelChart
                .ChartType = Excel.XlChartType.xlLine
    End With

    or

    With ExcelChart
                .ChartType = Excel.XlChartType.xlLineMarkers
    End With

    ~b
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Shellfire Box VPN + Lifetime Subscription

    The Shellfire Box easily connects all of your devices, even those that don't offer the possibility to establish a safe vpn connection. Access blocked content and surf safely, no matter where in the world you are located.

    The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
    Article by: Martin
    Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    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…

    934 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

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now