Referencing the Seconday Y axis scale values in code

Does anyone know how to Reference the Seconday Y axis 
scale values in code?  I am automating a spreadsheet that 
uses a chart and i need to adjust these values at run 
time.  I'm using Visual Basic.

Thanks!
0
anonymous (74721)
10/22/2003 5:02:37 PM
excel.charting 18370 articles. 0 followers. Follow

2 Replies
827 Views

Similar Articles

[PageSpeed] 25

Hi Ken,

I have absolutely no idea when it comes to coding but the following KB
article may point you in the right direction?

http://support.microsoft.com/default.aspx?scid=kb;en-us;213695

Cheers,
Katherine

"Ken Ramirez" <anonymous@discussions.microsoft.com> wrote in message
news:093901c398be$4b49ecd0$a001280a@phx.gbl...
> Does anyone know how to Reference the Seconday Y axis
> scale values in code?  I am automating a spreadsheet that
> uses a chart and i need to adjust these values at run
> time.  I'm using Visual Basic.
>
> Thanks!


0
10/23/2003 4:14:11 AM
Hi Ken,

Code generated via macro recorder.

Sub Macro1()
' The Excel constants are
' xlValue = 2
' xlSecondary = 2
'
     ActiveChart.Axes(xlValue, xlSecondary).Select
     With ActiveChart.Axes(xlValue, xlSecondary)
         .MinimumScale = 1
         .MaximumScale = 4
         .MinorUnitIsAuto = True
         .MajorUnitIsAuto = True
         .Crosses = xlAutomatic
         .ReversePlotOrder = False
         .ScaleType = xlLinear
         .DisplayUnit = xlNone
     End With
End Sub


Ken Ramirez wrote:

> Does anyone know how to Reference the Seconday Y axis 
> scale values in code?  I am automating a spreadsheet that 
> uses a chart and i need to adjust these values at run 
> time.  I'm using Visual Basic.
> 
> Thanks!

-- 

Cheers
Andy

http://www.andypope.info

0
andy9699 (3616)
10/23/2003 9:10:53 AM
Reply:

Similar Artilces:

Duplicate Axis Labels
I need to show the same axis labels on the left handside and the right hand side of the xy chart. I can add a secondary axis but them it messes up the trendlines and the both axis labels. Is there a way to have the same labels on both sides of the chart without messing up the trendlines? biscuitsmom: You can get left side axis labels by adding a custom axis, as discussed in thus tutorial: http://processtrends.com/pg_charts_custom_axis.htm To make your custom right axis, add a new data series with X values equal to the maximum value you want on the X axis. The Y values are the label...

datevalue returns #value
Hi - I;ve had a look through and cant find a solution to this problem. I have a column that returns a Quarter (of financial year) dependent on the date of an invoice. So an invoice date of 13/04/2009 returns Q1 in the column. I am doing this by converting the date by =datevalue(), and a nested IF formula based on those values. It works great for the dates that I have already, but if I add a row, or change a date (for instance July's rent was invoiced 30/06/2009, but I need to change that date to 01/07/2009, or even 30/07/2009 to make July's rent fall into Q2) it returns ...

match & combine 2 zip code lists and dollar amounts
I have one worksheet with a large list/column of zip codes, column of dollar amounts and a column of counties. i have another wksheet with a shorter list of zip codes (some duplicates & some new to the first wksheet) and a column of dollar amounts... i want to match/combine the duplicates and new zip code list from wksheet 2 to the wksheet 1 list and also add the corresponding dollar amounts to the wksheet 1 list of dollar amounts when duplicates and just add new rows of zip codes, dollar amounts when not duplicates. thanks. test "Will123" <Will123@discussions.microsof...

x-axis time interval
Trying to plot mortality rates per 5 year blocks, i.e. 1951-1955, 1956-1960. Can't get scatter plot to display those specific intervals. Rather, it simply labels the time points by the number cell in which the interval was typed, i.e. 1, 2. thanks A scatter chart needs numerical values. Try a line chart, which will treat the text "1951-1955" etc as labels. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions Peltier Technical Services, Inc. - http://PeltierTech.com _______ "John" <John@discussions.microsoft.com> wrote in message ...

Formatting Zero Values
I have a range of cells with numeric values, some of which are formulas. When the cell value is zero I would like to display a hyphen "-" rather than 0 or blank. Does anybody have a way to do this, preferably with a custom formatting that can easily be applied to each cell? Thanks, Kaval Hi use a custom format like 0;-0;"-" -- Regards Frank Kabel Frankfurt, Germany "Kaval" <Kaval@discussions.microsoft.com> schrieb im Newsbeitrag news:1284DEDF-83D3-4439-BB04-F11A207AB3B6@microsoft.com... > I have a range of cells with numeric values, some of which ...

disable macro/code after date & time
I have a code/macro that runs great. After July 1, 2010, I no longer want it to run (even if called). Any code that I can insert? Or better yet. On workbook open.... close in 10 seconds if after date x. If too complicated, then disable calculations after date x. Chip Pearson's site has a section on this topic that should help you http://www.cpearson.com/excel/workbooktimebomb.aspx -- If this helps, please remember to click yes. "J.W. Aldridge" wrote: > > > Or better yet. On workbook open.... close in 10 seconds if after date > x...

Help correcting HTTP redirect code for OWA Exchange 2K3
Hi, I am using the code from Q article 55126 to redirect incomming http request to https for OWA. I keep getting the error below. Can someone help me with the solution to this. Thanks in advance --mdanny ****** Microsoft VBScript compilation error '800a0401' Expected end of statement /owa_redirect/owahttps.asp, line 1 If Request.ServerVariables("SERVER_PORT")=80 Then Dim strSecureURL strSecureURL = "https://" strSecureURL = strSecureURL & Request.ServerVariables("SERVER_NAME") strSecureURL = strSecureUR...

The most occurence of a value in a column
I have 1 to 5 as values in a column. How can I find the number with the most occurrence in that column? Thanks, cpliu Hi =MODE(A1:A100) -- Regards Frank Kabel Frankfurt, Germany "cpliu" <chanciusliuDeleteThis@yahoo.com> schrieb im Newsbeitrag news:Xns959C8C47C309BchanciusliuDeleteThi@130.133.1.4... > I have 1 to 5 as values in a column. How can I find the number with the > most occurrence in that column? > > Thanks, > > cpliu Try: =INDEX(A1:A5,MATCH(MAX(COUNTIF(A1:A5,A1:A5)),COUNTIF (A1:A5,A1:A5),0)) Array-entered, meaning press ctrl/shift/enter. H...

Referencing merged cells
I'm having trouble referencing a merged cell in another workbook. Say I merge cells A1 to C1 in workbook 1. When I make this the active cell, the Name Box says "A1". When I go to another workbook (say, workbook 2), go to cell B1, type "=" and then go to the merged cell and select it, I get 'workbook1'!$A$1:$C$1 as the formula and, of course, the "#VALUE" error. I've successfully tried typing "=sum(" without the quotes hen clicking on the contents of the cell and then adding the ")" and it works O.K. but there should be an easi...

Sending MSMQ from MFC based code
I use the following code in a CSHARP project where I craete an MSMQ. It works fine if I send messages from another CSHARP project. UDP_Dll_Que = new MessageQueue(".\\Private$\\UDP_Dll_Que"); UDP_Dll_Que.Formatter = new BinaryMessageFormatter(); UDP_Dll_Que.ReceiveCompleted += new ReceiveCompletedEventHandler(Msmq_ReceiveCompleted); UDP_Dll_Que.BeginReceive(); I want to send message from an VS2008, MFC based projrct. The following code(passed compilation) based on the doc doesn't send - probably I miss something... IMSMQQueueInfoPtr qinfo("MSMQ.MSMQQ...

Lookup in two columns for same value
Hi and happy new year to uall, I have a problem, where I am trying to match a value in one of the sheets (say 1) to either of the two columns in another sheet (say 2) and then return the value to Sheet2 from the 3rd column of Sheet 1 Sheet 1: GM MG 1 JF FJ 2 DM MD 9 JS SJ 6 JM MJ 23 Sheet 2 (Should look like this) GM 1 MG 1 MJ 23 MD 9 Put this in B1 of Sheet2: =3DIF(ISNA(MATCH(A1,Sheet1!A:A,0)),IF(ISNA(MATCH(A1,Sheet1!B:B,0)),"not present",INDEX(Sheet1!C:C,MATCH(A1,Sheet1!B:B,0))),INDEX(Sheet1! C:C,MATCH(A1,Sheet1!A:A,0))) and then copy down...

Copy value from cell with custom format
Hi, I want to copy values from cells with a special custom number format. i.e. the cell value is displayed as 1060028 but it's literal value is 28. When I look at the number format in "format cells" it says the number format is 10600##. If I copy this cell from one to another even using "paste special values" it only returns 28. How can I copy the cell value 1060028 as a complete string? Would I use a function or would I have to use some VB script? thanks. The format should copy along with the value. Just use Paste, not PasteSpecial -- Gary''s Stud...

How do I change where category x axis crosses the 2nd y axis?
I'm trying to get the x axis to cross the y axis at zero for both the primary and secondary y axis. However, since both sets of data points has negative figures the x axis crosses the secondary y axis at a negative number. What am I doing wrong? On Fri, 15 Aug 2008, in microsoft.public.excel.charting, epu <epu@discussions.microsoft.com> said: >I'm trying to get the x axis to cross the y axis at zero for both the primary >and secondary y axis. However, since both sets of data points has negative >figures the x axis crosses the secondary y axis at a negative number...

Referencing another field if result is N/A
Hello, I have a situation where I am referencing data on another workbook. The reason behind this is the data in Column H can be entered incorrectly and often is. I am able to prevent this going forward but can not do so for the items already entered. I enter a formula via VBA, however, sometimes the result will be #N/A and if so I would prefer to leave the old value and just highlight it that it needs to be verified by hand. I am not sure if I can just "leave" the value as it has pretty much already been replaced. Due to this, I copy the column to a different colum...

Scale
Hello, eveybody. Can you help me out? Is that MS RMS able to use for the grocery market? I need to set up the scale for the grocery market. I looked up several option for that OPOS. However there isn't any Scale for the grocery market. Please help me. Try NCI 6720, commonly used by Sharp ECR and others, has OPOS drivers. http://www.averyberkelusa.com/ncipos/model_6720.htm "Joseph" <Joseph@discussions.microsoft.com> wrote in message news:C8378ADB-CC02-4D26-B61B-6B8BFE959FB1@microsoft.com... > Hello, eveybody. > > Can you help me out? > Is that MS RMS able t...

Worksheet doesn't permit F4 absolute referencing tool in formulas
I've never seen this before in a worksheet and can't find a Tool-Option that would change it. You can of course type the dollar signs in, but the F4 key won't toggle. Sure it's something simple, any help appreciated! -- ronthedog ------------------------------------------------------------------------ ronthedog's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=26504 View this thread: http://www.excelforum.com/showthread.php?threadid=397725 ...

This workbook is currently referenced by another workbook and cannot be closed.
The message is given when I try to close a workbook / kill Microsoft Excel. I'm using Microsoft Excel 2002 / XP. The spreadsheet includes a reference to another sheet that someone else referenced in another message here. I put the AddIn sheet in via: Tools, AddIns..., Analysis ToolPack - VBA. I've not referenced any function or procedure in the add-in. I get a Triangular Warning / Error ? It's got a graphic of a Yellow Triangle with an Exclamation Mark inside. The subject is the exact text of the warning. A Microsoft Search on the subject yielded nothing. Google yielded one ...

This forum does have value!
As year end approaches and I am considering upgrading to Money 2005, I found the message traffic extremely valuable. After this summers fiasco with the update to MSN Money locking us out of our local data file, I thought, or was hoping M$ would make an extra effort to make sure that Money 2005 was a significant improvement and without the assorted problems that I have found posted here. Some still unresolved. I have made my decision and I do not care how much work it is going to take me, bt I am going back to Quicken after giving Money a two year trial. This program is just not ready f...

external link values
Hi, is there a way to stop excel saving external link values when saving a document? i know i can copy then paste as values but the doc needs naming and saving at the outset. thanks Rick I don't know if this will do what you want, but you can use Tools; Options and uncheck the save external link values on the Calculation tab. >-----Original Message----- >Hi, >is there a way to stop excel saving external link values when saving a >document? > >i know i can copy then paste as values but the doc needs naming and saving >at the outset. > >thanks >Rick >...

Customize axis scale
I have a spreadsheet with dates and data to be graphed for each date. I would like to customize the x-axis(time) scale without having to edit the chart. The graph will be used and seen by many users, so I would like the user to input the initial and final dates in cells so the scale is automaticaly updated. I tried writing a macro for this and asigning it to a botton, but I get an error in the following line: .MinimumScale = Range("E2").Value E2 is the celll where the user inputs initial date. I would apreciate help with the VBA code, and would like to know if you can t...

Code Duplicate problem
Hi I am using the code below and it works fine if i am editing an existing record. My problem is if i create a new record then it ignores this code. Where else does this code belong so i don't have a problem? Thanks Private Sub case_no_BeforeUpdate(Cancel As Integer) Dim strMsg As String If IsNull(Me.Case_No) Or (Me.Case_No = Me.Case_No.OldValue) Then Else If Not IsNull(DLookup("ID", "tblLawsuitTracking", "ID = " & Me.ID)) Then Cancel = True strMsg = "Case number already exists" & vbCrLf & _ ...

How to get rid of #Value when multiplying
I am very new to Excel and I am trying to build an invoice sheet for my employer. Here is the scenario =F21*G21 But when I leave f21 and g21 blank I get #VALUE I need it to just be blank so I have a blank invoice. I also have =G37*9 if G37 is blank I get #VALUE Also my subtotal =SUM(H20:H44) if any field is blank i get #VALUE PLEASE HELP!! Submitted via EggHeadCafe - Software Developer Portal of Choice REPAIRING / REINSTALLING ASP.NET http://www.eggheadcafe.com/tutorials/aspnet/00a19e81-5b5a-4d96-8717-9f4b623c162f/repairing--reinstalling.aspx I assume you have a...

multiple select list boxes on form
I'm reposting this because I have been working for over three weeks trying to develop the VBA code and was hoping to stay in that vicinity. My form has multiple-select list boxes (both text and numbers) that contain customer contact info, company revenue, and sales relationships. How do I loop the code so that the form displays (which will eventually be exported to Excel) only the records based on the multiple criteria selection within each box? Any help you can offer is appreciated. I can get the code to work for one multiple-select dropdown filter, and I can get the code to work for...

referencing the cell above
Hi I have a kin a formula wich gets the value from the cell above and then add some. What I get is an list of values incrementing. When I delete one row in this list, all cells below 'crashes' with #REF!. What I need is that for the formulas to always look one cell up, even if I delete a row. Now it seems that if I delete Row8, then when Row9 become Row8 it reference to it self and then ov course goes bananas... Hope I made myself understandable ;-) Any ideas folks? -------- stuhag --------- Instead of using say =A19, use =OFFSET(A20,-1,0). This would go in A20, and as it does...

Scatter chart without numerical values
For some time now, when I create a scatter chart from tabulated (numerical) data, the chart does not display the x/y values, but the serquence numbers instead. This is similar to a bar chart, but should'nt happen with a scatter chart. The scatter charts have worked ok in the past. I'm using Excel 2000 in a company office environment where I have little control over the Excel installation/set-up. -- Regards Fred Are you really making an XY chart? If you make a Line chart with two numeric columns AND the first row have labels, Excel thinks both columns are y-data and uses 1,2,3...