Setting line width in chart

H

Hakyab

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
 
P

Peter T

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
 
J

Jon Peltier

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
 
H

Hakyab

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
 
J

Jon Peltier

Hakyab said:
Jon, I guess you are not going to tell me how to do it.

If I knew the answer I would tell you.
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.

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..
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?

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top