473,378 Members | 1,688 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,378 software developers and data experts.

Excel Chart within VB

Hi,

I am trying to add a series to a chart through VB. I have problem in setting the range for the series if it is a combined range (see the code below)

Set ws5 = Worksheets("BestFitLine")
Set Ch5 = Charts("Chart5")

With Ch5.SeriesCollection.NewSeries
.Name = "Fit"
.Values = ws5.Range("C235:C345,F6:F6")
.XValues = ws5.Range("B235:B345,E6:E6")
End With

It only works if the range is just a one contineous range (for example ("C235:C345") .

What I can do if I need to pick the range as above.

Thanks
Oct 10 '07 #1
0 864

Sign in to post your reply or Sign up for a free account.

Similar topics

13
by: Allison Bailey | last post by:
Hi Folks, I'm a brand new Python programmer, so please point me in the right direction if this is not the best forum for this question.... I would like to open an existing MS Excel spreadsheet...
6
by: ghanley | last post by:
Does anyone know how to change the datasource of an Embedded Excel chart in an unbound Object Frame. How to reference the properties?? I want to do something like this. Dim XLChart as...
2
by: JT | last post by:
Hi, I've read (and tried) the article "How To Automate Microsoft Excel from Microsoft Visual C# .NET" (available at http://support.microsoft.com/default.aspx?kbid=302084). This opens up Excel,...
1
by: Robin Tucker | last post by:
Heres and interesting problem: I have a VB.NET program that creates reports via. Word Automation. This all works fine. What I want to do as part of this report generation process is to embed a...
1
by: Randall Arnold | last post by:
I'm converting a vbscript program to vb.net. Witht he exception of .net idiosyncrasies, most of it is working well with the same code. My only problem is that some properties and methods are...
0
by: pmclinn | last post by:
The code below takes the data from the S column and grabs all the data and graphs it. The problem is this example grabs 500 cells worth of data and some of these cells = nothing. How do I rescope...
6
by: Thelma Lubkin | last post by:
I am trying to modify an Access form that allows a user to specify the information s/he needs from a census-type database. The form's code builds a SQL statement from the user's request, and...
0
by: madhatter84gn | last post by:
I am trying to automate an excel spreadsheet and then create a chart. Dim chartRange As Excel.Range If rollup Then chartRange = sheet.Range("O2:Q14", Type.Missing) ...
9
by: AGP | last post by:
I have a VB6 application that has an OLE container with an embedded Excel chart. Our office updated to Excel 2007 and now although the app works the charts looks like crap. Since the app is fairly...
1
by: Ally | last post by:
Hi all, I’m looking to plot charts in Excel from python. After some Googling I’ve found the following code: def plot(x, y, xAxisLog=False, yAxisLog=False): # acquire application object, which...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.