View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
septimus septimus is offline
external usenet poster
 
Posts: 20
Default Vertical line on Excel chart

I'm using Excel 2007. Recording a macro doesn't seem helpful; it
catches when I copy a line but not when or where I paste it.
What I'd really like is to create a data series of vertical dotted
lines. Is that possible??

Thanks!


On May 15, 4:49*pm, Martin Brown
wrote:
On 15/05/2012 20:02, septimus wrote:

I have a bar chart in Excel. I want to add a series of vertical dotted
lines at certain points on the x axis.


I can do this manually using Insert - *Shapes - *Line, but I want to
do it programatically.


In XL2003 or earlier macro capture should work enough to allow you to
see what you would have to do. Versions after that all bets are off.

I am able to put dotted vertical BARS (not lines) at the desired
points. And I can put a dotted line that runs across the bottom at
zero and then goes up at tne desired point, but neither are really
acceptable solutions.


There must be a way to do this?


If you mean to do as cursors at specific scaled points on a graph then
it is possible programatically but you have to provide separate versions
for XL2003 and earlier and XL2007 and above.

Getting the lines to sit exactly where you want is amusing as there are
plenty of quirks if the y graph scale gets switched to log for instance.

--
Regards,
Martin Brown