Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Chart defaults to Bar Chart

Posted on 2004-10-22
Medium Priority
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)

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.
Question by:Aiysha
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 26

Accepted Solution

EDDYKT earned 2000 total points
ID: 12383039
May be just

ActiveChart.ChartType = xlLine

Expert Comment

ID: 12383346
this is what i use in vb.net

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


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


Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

610 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