LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Setting line width in chart

It _is_ possible to change the border widths via points in Excel 2007. Try the following:

ActiveChart.SeriesCollection(1).Format.Line.Weight = 1.5

I discovered this in Andy Pope's post from the following discussion thread: http://www.eggheadcafe.com/software/...-excel-07.aspx

Someone wanted a macro written and they found the xlThin style (1 pt) too thin and the xlMedium style (2 pt) too thick. It's a little hard to discover this since if you do it through the GUI, the macro recorder does not record the command.

On Thursday, September 04, 2008 4:39 AM Hakya wrote:


I am trying to set the width of the line and the marker line for a series in
VBA. Completely stumped here, as these are not included in the help file.
Also when I turn on the macro recording, these operations are not recorded.

I sort of did the line width through weight property, but shouldn't you be
able to set it in points as well?

Thanks for any help!

Hakan



On Thursday, September 04, 2008 5:14 AM Peter T wrote:


You can't set a series line (border) width in points, you can set change its
Weight property to one of the four xlBorderWeight constants. It sounds like
you can already know how to do that.

You can though adjust MarkerSize in points.

Regards,
Peter T


"Hakyab" wrote in message
...



On Thursday, September 04, 2008 9:51 AM Jon Peltier wrote:


Hakan is using Excel 2007, which has a dual formatting personality. You
can't record a macro in 2007, but steps recorded in 2003 & earlier still
work (usually). However, it is a royal PITA to try to invoke the new Office
Art formatting through VBA.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Peter T" <peter_t@discussions wrote in message
...



On Thursday, September 04, 2008 10:11 AM Peter T wrote:


Ah Ha!

Regards Peter T



On Thursday, September 04, 2008 11:16 AM Hakya wrote:


Jon, I guess you are not going to tell me how to do it. If it is that
painful, I don't want to know either.

A couple questions for curiosity:
1. Why are the help files silent about this office art you mentioned? (For
one, I have not heard that before) Excel objects listed in MSDN help does not
appear to be complete, at least these formatting elements are missing.

2. I can (and do) record macros in 2007, the only time it did not work was
with these line width (or thickness) settings. Is this because I did not
select the correct library?

It almost looks like Microsoft does not want anyone finding out :)

Thanks,

Hakan


"Jon Peltier" wrote:



On Thursday, September 04, 2008 2:41 PM Jon Peltier wrote:


"Hakyab" wrote in message
...

If I knew the answer I would tell you.


My suspicion is that Office 2007 was prepared for release to hastily for all
of the help files to be updated for Office 2007 object model additions, and
even too hastily for the shape-related commands to be integrated into the
macro recorder..


Try to record any formatting related to the new shapes, either as standalone
shapes or as elements in charts. Nothing. And it's not you; the recorder
should find whatever library it needs, and any commands it needs.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______



On Friday, September 05, 2008 1:24 AM Hakya wrote:


Thanks a lot, at least I know I am not going to fiddle with that anymore.

"Jon Peltier" wrote:



Submitted via EggHeadCafe
Microsoft ASP.NET For Beginners
http://www.eggheadcafe.com/training-...NET/7/ASP.aspx

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2007 chart line width + axis labelling with VBA HB[_2_] Charts and Charting in Excel 6 August 25th 09 01:01 AM
setting chart length & width in centimeters Freddy[_3_] Charts and Charting in Excel 2 November 27th 08 01:51 AM
How to change the default width of line when deal with chart? Default width of line Charts and Charting in Excel 1 April 12th 08 10:14 PM
error in setting chart area width TONY Excel Programming 2 December 17th 07 09:52 AM
Custom Line Width in Line or Scatter Chart Marvin Charts and Charting in Excel 2 February 10th 07 05:44 PM


All times are GMT +1. The time now is 06:52 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"