reverse axis not working as before...

This code "worked" in 2003, but doesn't "work" in 2007...

In this context, "worked" means that in 2003, the X axis for both Y axes 
were reversed, as requested.  In 2007, only the X axis for the primary Y 
axis is reversed, with the X axis for the secondary Y axis remains the 
same (but the labels are reversed, so the graph looks odd and is hard/
impossible to interpret properly).

Also, the line marked with <<<<'s throws an error in 2007 but worked in 
2003.  Any ideas how to fix it?

Thanks!
Bruce


    Charts.Add
    ActiveChart.ChartType = xlXYScatter
    ActiveChart.SetSourceData Source:=Sheets(mainsheet$).Range("E:G"), 
PlotBy:=xlColumns
    ActiveChart.Location Where:=xlLocationAsNewSheet, Name:="tempsal"
    ActiveChart.SeriesCollection(2).Select
    ActiveChart.SeriesCollection(2).AxisGroup = 2
    ActiveChart.PlotArea.Select
    With ActiveChart
        .HasTitle = True
        .ChartTitle.Characters.Text = cruiseid$
        .ChartTitle.AutoScaleFont = False
        .Axes(xlCategory, xlPrimary).HasTitle = True
        .Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = "Distance 
(km)"
    End With
    With ActiveChart.Axes(xlValue)
        .HasMajorGridlines = False
        .HasMinorGridlines = False
    End With
    ActiveChart.HasLegend = False
    ActiveChart.PlotArea.Select
    With Selection.Border
        .ColorIndex = 16
        .Weight = xlThin
        .LineStyle = xlContinuous
    End With
    With Selection.Interior
        .ColorIndex = 2
        .PatternColorIndex = 1
        .Pattern = xlSolid
    End With
    With ActiveChart.Axes(xlCategory)
        .HasMajorGridlines = False
        .HasMinorGridlines = False
        .MinimumScale = 0
        .MaximumScale = 350
        .MinorUnitIsAuto = True
        .MajorUnitIsAuto = True
        .Crosses = xlAutomatic
        .ReversePlotOrder = True
'        .ScaleType = xlLinear          <<<<<<<<<<<<<<<<<<<<<
    End With
    ActiveChart.SeriesCollection(2).AxisGroup = 1
    ActiveChart.SeriesCollection(1).AxisGroup = 2
    With ActiveChart
        .Axes(xlValue, xlPrimary).HasTitle = True
        .Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "Salinity 
(ppt)"
        .Axes(xlValue, xlSecondary).HasTitle = True
        .Axes(xlValue, xlSecondary).AxisTitle.Characters.Text = 
"Temperature (degrees c)"
    End With
    For i = 1 To 2
        ActiveChart.SeriesCollection(i).Select
        With Selection.Border
            .Weight = xlThin
            .LineStyle = xlAutomatic
        End With
        With Selection
            .MarkerStyle = xlNone
            .Smooth = False
            .MarkerSize = 5
            .Shadow = False
        End With
    Next i
0
bbowler (11)
2/7/2012 3:53:13 PM
excel.charting 18370 articles. 0 followers. Follow

0 Replies
1309 Views

Similar Articles

[PageSpeed] 43

Reply:

Similar Artilces:

outlook not working correctly :(
Hello I use Outlook and in the inbox I'd like to find a particular email address by pressing the first character. It works with all the computers in our system but one, and i don't know what the problem can be. Please help me! :( Thanks:Gabor Sneff Sneff G´┐Żbor <snefi@freemail.hu> wrote: > I use Outlook and in the inbox I'd like to find a particular > email address by pressing the first character. It works with all the > computers in our system but one, and i don't know what the problem > can be. Please help me! :( Version? -- Brian Tillman Smiths Aeros...

Parameter Criteria from a forms Text box - 2003
Hi, I take a start date and an end date from a forms two text boxes. If the query is run without the criteria all is well. Between [Forms]![frmDialogWorksBooksReport]![txtStartDate] And [Forms]![frmDialogWorksBooksReport]![txtEndDate] Adding the criteria causes a dialogue box to open and ask for data - start and end dates e.g enter value for [Forms]![frmDialogWorksBooksReport]![txtStartDate] If I run it without the forms refrenence just with an easy 'Enter date here" - checks out OK. Yet in a similar form where this is used the query takes the information f...

Category Axis
I have a chart in access and my category axis is showing numbers instead of the category name. When I open the row source it shows up as the category? TRANSFORM Count(DeptCnt_qry.CATEGORY) AS CountOfCATEGORY SELECT DeptCnt_qry.DEPT FROM DeptCnt_qry GROUP BY DeptCnt_qry.DEPT PIVOT DeptCnt_qry.Quality; Apparently you have fallen into the trap of using a lookup field defined in a table. Your Row Source query must include the table and field that actually stores the department name. The current Dept field is only a number. The lookup fields fool you into thinking the "name&q...

FTP user redirection not working
I have a Windows 2003 Std. server which is our FTP server. Anonyms access is DISABLED. I have it setup so when a user connects to FTP they automatically are directed to a folder with the same name as the username they use to connect. This has been working just fine for about 6 months. Now, for some reason, when any/all users connect to FTP they are directed to the FTPROOT folder and NOT the folder named same as their logon name. This is a bad thing because they can see/access EVERY folder below the ftproot folder. Any suggestions? Thanks. ...

hyperlink not working in excel 2007, if worksheet is hide or hidden
I am facing this issue, need someone to share how to get the hyperlink working on excel 2007 if i hide or hidden the worksheet. Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink) With Sheets("Sheet1") .Visible = True .Select End With End Sub Gord Dibben MS Excel MVP On Tue, 1 Dec 2009 18:48:21 -0800 (PST), skyexcel <angela.chin88@gmail.com> wrote: >I am facing this issue, need someone to share how to get the hyperlink >working on excel 2007 if i hide or hidden the worksheet. Unhide the sheet, do your operatio...

Working with DOM in VC++
Hello, I think I have a problem that can't be solved this way. But I'll try anyways. I am working with SVG and JavaScript and I have created a VC++ dialog that uses CWebBrowser. CWebBrowser's function is calling web pages that use JavaScript and SVG. My JavaScript is using DOM to alter SVG content but it is only done on DOM level and whatever change the user is making doesn't affect the actual file contents. What I need to do is to change the contents of a web file itself. For example. If I my original SVG code is: <text id="some_id"> Original ...

2nd axis graph
I am running Office/Windows 2K. I have a spreasheet that contains names of cities. Next to this column I have two sets of data. I wish to create a bar chart that will plot the city names along the x axis and then have two y axis to display the 2 different sets of data. I can create the second y axis, however, this creates a stacking bar chart which I do not want. Does anyone know how to do this? Many thanks. Regards Ket Ket - What appear as stacking bars are likely two sets of bars, one in front of the other, instead of side by side. You can make a side by side column chart on two axes...

Recommendations for Sharing Work Notebooks
Hey everyone, I was wondering what would be the best way for my boss & i to be able to share our notebooks back & forth? We are not on the same work network, on different internet connections, and both on laptops. I was wondering if anyone knows if I can share a notebook with him via a shared folder on my laptop and even if am not online or do not have laptop on can he access it and update it? If so, will the notebook sync the new material into shared NB when I open my OneNote? Also, does anyone have an opinion about whether MS Windows SharePoint doc library would be worth...

RDP not working if 2003 SP2 installed
Hi All, I have had networking issues with SP2 on SBS 03 machines before, but they have been relativley easy to resolve by changing RSS, Chimney etc. This box I've just been assigned to fix is giving a bit of grief. I've uninstalled, reinstalled, reinstalled... SP2 several times. Without SP2 the RDP runs like a charm, checking the listening port using "netstat -aon | find ":3389" I can see the listening tcp port 3389 no problem, but as soon as you put the SP2 back in the ts listening port disappears. I've installed BPA, and applied every other pa...

Try to use caspol but this command doesn't work
Hi! I try to set a security policy so the runtime interpret the assembly to being run in code group Internet_zone but this command has some syntax error that I can't see what it is ? caspol -ag 1 -url file:///C:/test/* Internet -n InternetTest -exclusive on //Tony "Tony Johansson" <johansson.andersson@telia.com> wrote in message news:%23wkIB6N%23KHA.3176@TK2MSFTNGP05.phx.gbl... > I try to set a security policy so the runtime interpret the > assembly to being run in code group Internet_zone but this command has > some > syntax error that I...

How do I make the X-Axis increase in scale with the quantity?
For example: If I have the values 1.5, 3.5, 8.7, 9.9 in the x values for a line graph, is there anyway to make them spaced apart so that they are in scale with eachother... Like so the distance between 3.5 and 8.7 is larger than, the distance between 1.5 and 3.5? Create a XY Scatter chart. It, and a bubble chart, are the only 2 that allow for cardinals values on the x axis. -- Regards, Tushar Mehta www.tushar-mehta.com Excel, PowerPoint, and VBA add-ins, tutorials Custom MS Office productivity solutions In article <F2D3DC58-86D3-4D21-9D57-F704A78941FB@microsoft.com>, =?Utf- 8...

Axis Labels #2
Hi, I want to set Category X axis lables range using vba code (programmatically). and how to enable secondary Y axis enabled and assign value to that secondary Y axis. Please help me. thanks. Sub AssignDataToSeries() With ActiveChart.SeriesCollection(1) .Values = Worksheets("Sheet1").Range("F6:F9") .XValues = Worksheets("Sheet1").Range("E6:E9") .Name = Worksheets("Sheet1").Range("F5") End With End Sub - Jon ------- Jon Peltier, Microsoft Excel MVP Peltier Technical Services http://Peltier...

Save prompt is not working
I have the embeded macro onClick event to close the form and set save to prompt. But it didn't prompt when it close the form. I also have below event in my form and it still not prompting to save. What I need to check? Thanks Private Sub Form_BeforeUpdate(Cancel As Integer) 'get user confirmation of whether to save record or not If MsgBox("Do you want to save the new BOM?", vbYesNo) = vbNo Then Me.Undo Cancel = True End If End Sub If you use the line Cancel = True in the before update event, the form will not close. I suggest you put a close ...

Some macros not working on shared workbook
Hi all, I'm sharing a workbook but one of the macros isn't working: Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) Const WS_RANGE As String = "J:J" Dim rng1 As Range Dim rng2 As Range If Target.Cells.Count > 1 Then Exit Sub End If If Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then Exit Sub End If Set rng1 = Target.EntireRow.Range("A1:J1") With Worksheets("outcomes") Set rng2 = .Cells(.Rows.Count, 1).End(xlUp).Offset(1, 0) End With On Error GoTo ws_exit: Application.EnableEvents = False If Targe...

Secondary Axis?
I have a Vertical Bar Chart designed in MSGraph 2000. It works just fine... I plot NoOfDefects (Y axis) against 36 Defects (X axis) for a particular product. I'd like to add a secondary axis (Z-axis?) that would plot the Average Defect Values across all my products. So my bars (individual product) will compare to the Line (All Products) Where can I get good information on how to create and use a secondary axis? Do I have to select a different chart type than just a regular Bar type? Just need to get going in the right direction... thansk for any assistance. Al Camp --- Outgoi...

how do i work i pints and gallons
i would like to have a column that works in pints and gallons that will add up at the bottom. so if i put in 1.4 (1 being a gallon & .4 being pints) + 2.7 (2 being a gallon & .7 being pints) the answer i need would be 4.3 as there are 8 pints in a gallon Using Excel 2007 =INT(SUM(INT(A1:A10))+SUM(MOD(A1:A10,1)*10/8))+MOD(SUM(INT(A1:A10))+SUM(MOD(A1:A10,1)*10/8),1)*8/10 as an array formula (Control Shift Enter) -- David Biddulph Rowing web pages at http://www.biddulph.org.uk/ boss steve wrote: > i would like to have a column that works in pints and gallons t...

Password change doesnt work in OWA
Anyone having issues changing their password in OWA 2003? I have OWA set up on an exchange 2003 front-end server in a dmz running win 2003 server. thx! You will first need to make sure its enabled to click on. You will also need SSL. This aticle has some good links. The Outlook Web Access Change Password Option Does Not Function ID: 321582 The most important one is: How to hide or show the Change Password button on the Options page ID: 297121 By default in Microsoft Exchange Server 2003, the button does not appear. -- Hope that helps, Dan Townsend This posting is provided "A...

Access 2003 Upsizing Wizard does not work.
I can not get the Upsizing Wizard to work. System is: XPPro SQLServer 2k Developer Access 2003 Norton Firewall I can get the Wizard to run on my laptop, same OS and SQL. Access 2002, no firewall. No matter what I do, when I run the Upsizing Wizard it always tells me the it can't find the server or access denied. I've tried both kinds of authentication to no avail. I am the Admin. I have granted myself every permission I can find. I can go into EM and work with the DBs. I can link them to Access via ODBC and it works. I updated the MDAC libraries. I suspect the Firewall but I ha...

xslt not working with schema file associated
Probably a bit of a newbie question this. I have an XML file like this: <?xml version="1.0" standalone="yes"?> <AuditLogonGroup xmlns="http://tempuri.org/AuditLogon.xsd"> <AuditLogon> <Username></Username> <IPAddress></IPAddress> </AuditLogon> <AuditLogonGroup> I have a XSLT file that does this : <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output omit-xml-declaration="yes" method="html" version="4.0&qu...

Outlook 2003: AutoComplete Email not working...(yawn)
THis has been tackled before on this forum, I have searched but could not find a solution for my problem. Just migrated from OE6 (with its briliant autocompltete features), now I want to know why my autocompl feature in OL2003 not working. Tools>Options>Pref>Email Options>Advance Email Optios>check atuo name compl, check suggest names.. Am I missing something here? Does autocomplte not look in my address book to see if that name appears to help me from retyping the whole name/email?? I do I make it do that Many Thanx SL How do you know it doesn't work? How many messages hav...

outlook express spellcheck doesn't work
I get and error message when I try to run spellcheck in outlook express. I have word, and excel and should be able to use word as the email editor? Help "Seth" <anonymous@discussions.microsoft.com> wrote in message news:070701c3af87$88da4ec0$a001280a@phx.gbl... > I get and error message when I try to run spellcheck in > outlook express. I have word, and excel and should be > able to use word as the email editor? Help This newsgroup is for support of Outlook 97/98/2000/2002/2003 from the Office suite of products. Outlook Express is actually a separate program...

Find Method not working
Greetings all. Windows xp xl97 Someone please explain to me why this code won't work. Private Sub cmdViewOrder_Click() myOrder = InputBox(Prompt:="Please enter the Order # that you would like to view.") Worksheets("Data").Range("B5:B65536").Find (myOrder) End Sub I am getting "Find Method of Range Class Failed" Thanks in advance, doodle You omitted a few things Private Sub cmdViewOrder_Click() myOrder = InputBox(Prompt:="Please enter the Order # that you would ike to view.") x= Worksheets("Data").Range("B5:...

My email address auto completion doesn't work in Outlook 2003
Hi, I just changed over from Outlook Express to Outlook. I imported all my mail and address book, and the program is working well except for the auto completion. When I attempt to type in the first few letters of outgoing email address (which are in my address book, and used all the time), the suggested email address does not come up. I checked on the Microsoft help site and it appears that this function should be in the "on" position by default. There should also be a item in Advanced email options which allows the suggested email addresses to come up, but my version does not...

New HD always working?
Hey all. Just got a brand new 1TB hitachi HD from PCW and installed and it seems to be OK and everything works fine on it. Apart from one thing: it is always accessing. This happened even before anything was installed at all and I was hoping it would go away after a driver update and turning off any background stuff or the indexing service. It's still the same though and it will 'work' regardless. Does anyone have any ideas or is it a back to the shop job? Thank all Is this HD an internal one? If so then perhaps the connections may not be correct and so th...

Link Two Excel Work Sheets
I have tow Excel Worksheets, one is source file and other is linked destination file. Is it possible on the destination file to data files in different columns than source file. I can only seem to get them to look the same (mirror each other). Thanks JR Hi just select your target cell, enter the equation sign '=' and select your source cell -- Regards Frank Kabel Frankfurt, Germany JR wrote: > I have tow Excel Worksheets, one is source file and other is linked > destination file. Is it possible on the destination file to data > files in different columns than source fil...