I have the following macro. It works fine, creating an XY scatter plot in Excel 2003, but when one of my users runs it in Excel 2007, it creates a scatter plot with lines. Why does it do this? I am using "ChartType = xlXYScatter", not xlXYScatterLine s. - Public Sub CreateChart(ByVal viLabeledSeries As Integer,
-
ByVal viNonLabeledSeries As Integer, ByVal vsWorkbookName As String,
-
ByVal vsPopulationName As String, ByVal vsPrimaryAxisTitle As String,
-
ByVal vsSecondaryAxisTitle As String)
-
Dim i As Integer
-
Dim series As series
-
Dim sXColumn As String
-
Dim sYColumn As String
-
-
'Create the chart
-
Charts.Add
-
ActiveChart.ChartType = xlXYScatter
-
ActiveChart.PlotBy = xlColumns
-
-
For i = ActiveChart.SeriesCollection.Count To 1 Step -1
-
ActiveChart.SeriesCollection(i).Delete
-
Next i
-
-
'Add the data series
-
For i = 1 To viNonLabeledSeries
-
sXColumn = GetColumnNameFromNumber((i - 1) * 2 + 4)
-
sYColumn = GetColumnNameFromNumber((i - 1) * 2 + 5)
-
Set series = ActiveChart.SeriesCollection.NewSeries
-
series.XValues = Sheets("Data").Range(sXColumn & "1:" &
-
sXColumn & "30000")
-
series.Values = Sheets("Data").Range(sYColumn & "1:" &
-
sYColumn & "30000")
-
Next i
-
-
For i = 1 To viLabeledSeries
-
'Add the first data series because this way, the points will be on
-
'top of the other points so it's easier to see them
-
Set series = ActiveChart.SeriesCollection.NewSeries
-
series.Name = Sheets("Data").Range("A" & i)
-
series.XValues = Sheets("Data").Range("B" & i & ":B" & i)
-
series.Values = Sheets("Data").Range("C" & i & ":C" & i)
-
Next i
-
-
-
ActiveChart.Location Where:=xlLocationAsNewSheet, Name:="Chart"
-
ActiveChart.PlotArea.Select
-
Selection.ClearFormats
1 5586
Ok, I figured out why Excel 2007 adds the lines.
I need to add the following code for each series created: - If Application.Version >= 12# Then
-
series.Format.Line.Visible = msoFalse
-
End If
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: mike420 |
last post by:
I think everyone who used Python will agree that its syntax is
the best thing going for it. It is very readable and easy
for everyone to learn. But, Python does not a have very good
macro capabilities, unfortunately. I'd like to know if it may
be possible to add a powerful macro system to Python, while
keeping its amazing syntax, and if it could be possible to
add Pythonistic syntax to Lisp or Scheme, while keeping all
of the...
|
by: Dr. Colombes |
last post by:
What is the easiest way to generate some plots and graphs in Python ?
Specifically interested in simple histograms and scatter plots with
circles and regression lines.
Thanks for your suggestions.
|
by: P Fu |
last post by:
I am trying to plot pair using the XY scatter chart in Access and
place it into a report. I want my x-axis to have "Age" values and the
y-axis to have "Gross Area" values, both pulled using a query I
created. Since the chart dialogue boxes only ask for the Y data
series with an arbitrary X coordinate of 1, is there any way I can
change that? That is, use the "age" values as the x-axis, not the
arbitrary 1?
Thanks for your help in...
|
by: Newbie_sw2003 |
last post by:
Where should I use them?
I am giving you my understandings. Please correct me if I am wrong:
MACRO:
e.g.:#define ref-name 99
The code is substituted by the MACRO ref-name. So no overhead.
Execution is faster. Where will it be stotred?(Is it in bss/stack/?)
FUNCTION:
|
by: Joe |
last post by:
This probably isn't the right group for this kind of question but I figured
I would take a shot...
I want to remove points that skew a scatter plot. For example 20 data points
are around -75 to 100 on the Y axis but a couple of points are at 1500 and a
couple at -500
How would I figure which points should be removed? Of course I want to
remove the 1500's and -500's.
| |
by: PremKumar |
last post by:
I want to plot the lines in my form given only X and Y
coordinates and I have to plot lines X and Y according to
the given Surveyid.FOR ex:-
x y Surveyid
10 10 5
12 12 5
17 17 5
27 27 5
31 31 5
33 33 14
|
by: Derek Basch |
last post by:
Can anyone give any suggestions on how to make a logarithmic (base 10)
x and y axis (loglog) plot in matplotlib? The scatter function doesn't
seem to have any log functionality built into it.
Thanks,
Derek Basch
P.S. I suck at math so feel free to make me feel stupid if it is really
easy to do :).
|
by: DFS |
last post by:
I posted this question yesterday, and nothing but silence.
I looked through cdma in Google, and it seems whenever someone posts
questions about scatter charts, they get ignored.
So, hopefully, this time, someone will have some brilliant response to
share.
Starting with the Chart Wizard, I can't get the Access scatter chart to
place the data points correctly, ie at the intersection of their XY
|
by: derelict |
last post by:
Hey all, im getting desperate now.
I have a macro running in Word 2003, when I run the macro it *should* put a 'bottom' cell border in each cell that has the style used - this included a border at the top of the table and one at the bottom, like a set of container border for a table with no border within it. i.e
table heading
_______________________________ << top border
text in the table spanning multiple rows and columns...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| | |