VBA Axis line weight

I am trying to set a number of parameters on a chart but am missing a
way to set the axis line thickness (weight)?  I have XLS 2007.

    With ActiveChart.Axes(xlValue, xlPrimary)
        .AxisTitle.Font.Name = "Arial"
        .AxisTitle.Font.Size = 12
        .AxisTitle.Font.Bold = True
        .AxisTitle.Font.ColorIndex = 16
        .AxisTitle.Top = 70
        .AxisTitle.Left = 43
        .TickLabelPosition = xlTickLabelPositionLow
        .TickLabels.Font.Name = "Arial"
        .TickLabels.Font.Size = 12
        .TickLabels.Font.Bold = False
        .TickLabels.Font.ColorIndex = 16
    End With

I keep hitting a brick wall with with axis.width so that can't be it!

Steve
0
SteveG
12/15/2009 4:00:51 PM
excel.charting 18370 articles. 0 followers. Follow

2 Replies
2131 Views

Similar Articles

[PageSpeed] 59

Excel 2007 Chart
Format Axis
http://www.mediafire.com/file/ozmyqzi2ymk/12_15_09.xlsm
0
Herbert
12/15/2009 6:37:01 PM
Dim ax As Axis
Set ax = ActiveChart.Axes(xlValue, xlPrimary)
' only do this in xl2007+
ax.Format.Line.Weight = 2.25

Regards,
Peter T

"SteveG" <steve31530@gmail.com> wrote in message 
news:53cfebe5-8a16-4503-acf3-b7f59167d293@r24g2000yqd.googlegroups.com...
>I am trying to set a number of parameters on a chart but am missing a
> way to set the axis line thickness (weight)?  I have XLS 2007.
>
>    With ActiveChart.Axes(xlValue, xlPrimary)
>        .AxisTitle.Font.Name = "Arial"
>        .AxisTitle.Font.Size = 12
>        .AxisTitle.Font.Bold = True
>        .AxisTitle.Font.ColorIndex = 16
>        .AxisTitle.Top = 70
>        .AxisTitle.Left = 43
>        .TickLabelPosition = xlTickLabelPositionLow
>        .TickLabels.Font.Name = "Arial"
>        .TickLabels.Font.Size = 12
>        .TickLabels.Font.Bold = False
>        .TickLabels.Font.ColorIndex = 16
>    End With
>
> I keep hitting a brick wall with with axis.width so that can't be it!
>
> Steve 


1
Peter
12/17/2009 3:07:03 PM
Reply:

Similar Artilces:

Value Y axis label is cut off
I can't figure out how to increase the "text box" around the Y axis label. In the display, it shows the entire word, but in the actual chart, the last letter of the word is cut off. It appears that I can only move the position of the entire label, but I'm not able to stretch the label so that it includes the entire text. I tried putting a couple spaces after the text in the Title field in the Chart Options screen, but this didn't help. Example: The Y axis label is "Annual Return" and it looks like it says "Annual Returr" due to the "n" b...

Log file sorting with VBA
I would like to sort a log file by each variable in the log. There is date column and four other columns that I would like to be able to sor alphabetically . I would like to create macros that can sort each column. For example - my column titles are date (A), item (B), action(C) Reason(D), Person(E). I would like to create buttons with macros fo each column, so that when I click a button it sorts all of the ro entries. I would also like to create a macro for a new entry which shifts all o the rows down. Does anyone know of any similar VBA code for either of these actions i excel, or can...

Getting Trend Line Info from Chart
Hi - I am creating a manpower report and updating learning curve charts for a decision making tool through VBA. The issue I am having is the trend line (Power) in the charts gives me the output I need but I cannot figure out how to pull the values I want into the spreadsheet. I have tried a couple of functions but have come up empty handed. The RSQ function is not multilinear. Does anyone know the formula for a power trend line? For example out of 100 samples I get the following info: y = 1.5326x0.0657 R2 = 0.5744 Thank you in advance for any asssistance. Carrie -- Message posted via Offi...

Column and line information in Word
I have my cursor in a Word document and want to see which column it's in and which line it's on. How do I view those details? In 2007, right-click over the Status Bar at the bottom of the Word window, and choose the options you wish to see, including Line Number and Column. Hope this helps DeanH "HS" wrote: > I have my cursor in a Word document and want to see which column it's in and > which line it's on. How do I view those details? ...

inserting phase lines on a line graph
Does anyone know how to insert a phase linei nto a line graph? Any help would be greatly appreciated. ...

Line Spacing in OutlookXP
When selecting stationary(sunflower) I lose the ability to change line spacing. When I type a list it double spaces, but when I type text it single spaces on the wrap. I cannot find a way to change the line spacing to single spacing. Outlook XP. I'm not sure if this is the best answer to your problem, but if you use SHIFT+ENTER instead of just ENTER for a return, you should get a single space instead of double. -- Jocelyn Fiorello MVP - Outlook *** Messages sent to my e-mail address will NOT be answered -- please reply only to the newsgroup to preserve the message thread. *** ...

Cycle through a list in VBA
Hey, I need to just do a For...Next loop to cycle through a predefined list (or range really). Sort of.. For every cell in this list Check the text in list against a variable perform action Next in list that sort of thing. I just don't konw what to call the list, cell, anything.. Thanks in advance. azidrane Something like Sub Iterate() Dim myCell as Range For Each myCell in Range("A1:A100") 'do stuff here Next MyCell End Sub You can use Selection instead of the range dsignation whih will iterate the cells under the selection -- HTH Nick Hodge Microsoft ...

FieldName Variable in VBA
Working in Access VBA: ‘Where S1Speech is a field name in an Access 2007 table called SP ‘This 1st example works fine putting the value from S1Speech into the variable S1 Dim S1 as String S1= [S1Speech] ‘ These other 2 examples don’t work Example #2 Dim S1 as String Dim TXHolder as String TXHolder = S1Speech S1=[TXHolder] Example #3 Dim S1 as String Dim TXHolder as String TXHolder = [S1Speech] S1=TXHolder Is there a way to use a variable in a situation like this? Thanks -- Dennis Dennis You don't mention where this code is runni...

Controlling excel chart axis
Hi, I have automated plotting of charts of date v/s speed recorded on a particular day with date on the x-axis and speed on the y-axis for each car that is being tested say Focus, Escort and Ikon. The graph gets displayed properly for the first data selected (say Focus) from a combo box. Now, for the other selection, the graph axis are getting reversed i.e date is getting plotted on the y-axis and speed on the x-axis ! Is there some why to control this ? I’m using Excel with VBA. TIA Is it still the same type of chart? You must somehow be mixing up Values and XValues for ...

Grid lines are not aligned when I print. How do I fix this?
When I print my document the grid lines are not aligned. They appear to be fine on the screen. The alignment became crooked after moving the page borders so that the document will fit on one page. This sounds like a printer hardware problem not an Excel issue. Sorry, Sincerely, Gary Brown "Solution Seeker" <Solution Seeker@discussions.microsoft.com> wrote in message news:E73B3DCF-F08E-4929-B599-C3D083A155AA@microsoft.com... > When I print my document the grid lines are not aligned. They appear to be > fine on the screen. The alignment became crooked after moving the ...

excel vba
i am trying to set up something in cell K5 whereby it will produce upo opening, a sequential number 1 higher than the last. I think the end code is Range("K5").Value + 1 but how do i set it up to get that sequencing -- Message posted from http://www.ExcelForum.com Hi You need this event to run your code line when the workbook opens Private Sub Workbook_Open() With Sheets("sheet1") .Range("K5").Value = .Range("K5").Value + 1 End With End Sub Right click on the Excel icon next to file on the menu bar Choose view code The ThisWorkboo...

VBA codes question
Hi, I just write down some VBA codes for an application. What I need is extract some data from a selected area by mouse left-button. So what should I do ? The most I concerned is how to get the Range object of the shadow area selected by mouse. Thanks. ...

VBA Question: Called macro stops unexpectedly
Hello, I'm new to using VBA in Excel. I'm hoping I'm missing something simple and that someone here can help me. I have one Excel workbook that has many subroutines/macros in Module 1. I have 5 worksheets in the workbook and each has navigation buttons to move from sheet to sheet. On one sheet, there are required fields that must be checked before a user can be moved to the desired sheet. The buttons call the appropriate macro, like GoTo_Report, which takes the user to the Report sheet. But, on the Project Info screen, I need all these buttons to also run the macro that chec...

Trend line #2
Help! Can you use the trend line in Excel on a month by month basis? I’m using the trend line over a 12 month period Oct-02 to Sep-03 I have just changed the months to Nov-02 to Sep-03 have been given totally difference in trend lines. It this possible?? Last month the trend line indicated a 14% increase and with the new months is show a 60% decrease! Thanks Tony - How well do your trendlines match each year of data? If the data is curved, with an upwards slope early and a steeper downward slope in later months, you might see this kind of change. Things like trendlines and regressio...

VBA #6
When opening Excel or attempting to export from MS Great Plains to Excel, I receive the following: "Could not run the Visual Basic Environment. Please run Setup." "An error occurred initializing the VBA libraries (1157)" I have run setup for errors and tried re-installing Office XP Prof. w/o success! Any suggestions? Thanx. You might try Detect and Repair on the Excel Help menu. -- Jim Rech Excel MVP "dcs" <anonymous@discussions.microsoft.com> wrote in message news:2a2701c47e33$4f1785b0$a301280a@phx.gbl... | When opening Excel or attempting to expor...

Y-axis label Bug
Has it been reported and is a solution being found to the problem with Y-axis labels in Excel 2003? When ever a y label is used the end portion is cut off and not displayed on screen. It will print ok from excel but not if the figure is copied or inserted into word. The last I knew, it hadn't been fixed. The "fix" (and I use that term loosely) is to put in several ... at the end of the Y axis label and then format ... so that it's the same color as the background. I had to update something like 50 charts when I first discovered I had the problem. I'll be gl...

Excel "chops off" half of first line of text
I have a spreadsheet where one column is cells that each contain 30 to 50 words of text. Even after applying FORMAT, ROW, AUTOFIT when I print I lose the top 50% of the characters in most, but not all, of the top line of these cells. Everything looks fine on screen prior to printing. Has anyone any ideas or work-rounds, please? Hi, The easiest (and non programmatic) way to do this is to highlight the sheet, and mouse over one of the row divisions (i.e. between 2 rows, which you would normally use to resize). Double clicking here will expand all rows to autofit contents. Otherwise,...

Saving without VBA code
I have a workbook that has some VBA code in the ThisWorkbook module to define a toolbar button. This button uses VBA code in another module to save a set of ranges to a new spreadsheet file. I accomplish this by creating a new workbook, copying each range (each is on a separate worksheet), then saving the new workbook with a new name. Unfortunately, the VBA code in ThisWorkbook is also copied to the new workbook, so when the new spreadsheet file is opened, it also has the toolbar button. Is there any way to do this without also copying the VBA code from ThisWorkbook? Or, is there a way to remo...

how to use imperial weights in Excel
How can I get a running total in Excel working in lbs and ozs Zebedee, One way: Starting in row 2, enter the pounds in one column (A), and the ounces in another (B). Then in a third column (C), use the formula =SUM($A$2:A2) + INT(SUM($B$2:B2)/16) and in a fourth column (D), use the formula =SUM($B$2:B2) -INT(SUM($B$2:B2)/16)*16 and copy down to match your columns of data. HTH, Bernie MS Excel MVP "Zebedee" <Zebedee@discussions.microsoft.com> wrote in message news:9CBDB5B4-FC3E-45DE-A72E-D1907C003112@microsoft.com... > How can I get a running total in Excel working...

drawing lines in Excel 2007
OK. I understand change. Change is good. But how does one draw a simple straight line and retain control over it? I can draw it using line from shapes and the shift key to constrain it to vertical. The second I try to move it, it goes off vertical never to return. Moreover, I can't move it horizontally beyond the middle section of the chart area. It hits some invisible shield. I simply want to be able to highlight individual data points on a line graph by a vertical line from the x axis to the top of the chart. -- Perplexed in Trana Change is fine if it brings about improv...

Setting chart scale min/max in VBA
Would like to set the scale on several different charts in the same workbook based on min and max values in a data range. Can do it manually but it would be nice to automate it. Any help? Hi, See Jon's page, http://peltiertech.com/Excel/Charts/AxisScaleLinkToSheet.html Cheers Andy pjasak@alum.mit.edu wrote: > Would like to set the scale on several different charts in the same > workbook based on min and max values in a data range. Can do it > manually but it would be nice to automate it. Any help? > Here's an example of setting min and max dates for a trend chart...

Line Graph Excluding 0 Values
Dear, I have plotted a line graph consisting the data for the entire month. The data range is getting calculated automatically by a formula. 1 Dec - 100 2 Dec - 105 3 Dec - 0 4 Dec - 0 So on... The data for the days starting from 3 Dec is zero and the line graph suddenly goes down to zero... Is there any way that the line graph picks the data excluding the zero values? I mean the line graph should only take the data for 1 Dec and 2 Dec without changing the data range. Thank you. one way might be to hide columns for 3 Dec, 4 Dec etc. On 2 Gru, 08:19, Sasikiran ...

block by subject line
Is there a way to block emails by subject line from the Exchange 2003 server without add-ons? Regards, Mark On Sat, 15 Oct 2005 08:25:46 -0400, "Mark" <canadaone@rogers.com> wrote: >Is there a way to block emails by subject line from the Exchange 2003 server >without add-ons? > >Regards, > >Mark > No. Exchange has some connection/recipient filtering capability however. http://support.microsoft.com/default.aspx?scid=kb;en-us;823866 "How to configure connection filtering to use Realtime Block Lists (RBLs) and how to configure recipient filter...

Graphing a line on a stock chart??
I've created stock chart (the one with bars) using the high, low, an close of the stock price. I'd like to add another data series and grap it in a line format rather than the type being used by the stock chart I can't figure out how to do it using the wizard. Is it possible? I not through the wizard, can it be done through VBA? Thanks -- Message posted from http://www.ExcelForum.com Jon Peltier has instructions for adding a series to a stock chart: http://www.peltiertech.com/Excel/Charts/ComboCharts.html#OHLCplus PropKid < wrote: > I've created stock chart (the ...

Line spacing in text boxes for web pages
For some reason, the text formatting menu in the web page project area doesn't have an option for changing the line spacing from double-spaced. I want the text on my web pages to be single spaced. In all the other projects, you can use the text formatting menu to change the line spacing but I don't see that anywhere on my web page project. Surely, web pages don't *have* to be double- spaced? They *don't* have to be anything. Have you read the HELP file? How *would* we know when *you* don't tell us what version of Publisher you are using!!! Pity you *don't* hav...