Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-16-2011, 07:41 AM
judicial85 judicial85 is offline Edit Marker Lines VBA 2010 Windows 7 Edit Marker Lines VBA 2010 Office 2010 (Version 14.0)
Advanced Beginner
Edit Marker Lines VBA 2010
 
Join Date: Nov 2010
Posts: 64
judicial85 is on a distinguished road
Default Edit Marker Lines VBA 2010

I have tried for a while now to edit the lines of my chart series in VBA. I am looking for some simple changes to SeriesCollection(1).Select



With Selection
"series line is 2.25 width"
"MARKER line is the default 0.75"
End With

The problem is when I do code as below, the weight command of one of those overwrites the weight command of the other. How do I distinguish between the two kinds of "lines" in VBA so I don't get bloated markers?

Best,
Bryan

Code:
With Selection
    .Format.Line.Visible = msoTrue
    .Border.Color = RGB(0, 0, 0)
    .Format.Line.Weight = 2.25
    .Format.Line.ForeColor.RGB = RGB(0, 255, 0)
    .Format.Line.ForeColor.TintAndShade = 0
    .Format.Line.Transparency = 0
    .Format.Fill.Solid
    .Format.Fill.ForeColor.RGB = RGB(0, 0, 0)
    .Border.Weight = 0.75
        
    End With
PS - The order is somewhat random now as I have tried moving commands around to see what the effects were...
Reply With Quote
  #2  
Old 03-18-2011, 07:26 AM
Kimberly Kimberly is offline Edit Marker Lines VBA 2010 Windows 7 64bit Edit Marker Lines VBA 2010 Office 2010 64bit
Expert
 
Join Date: May 2010
Posts: 517
Kimberly is on a distinguished road
Default

Why not use the macro recorder?
Reply With Quote
  #3  
Old 03-18-2011, 07:29 AM
Kimberly Kimberly is offline Edit Marker Lines VBA 2010 Windows 7 64bit Edit Marker Lines VBA 2010 Office 2010 64bit
Expert
 
Join Date: May 2010
Posts: 517
Kimberly is on a distinguished road
Default

I'm not seeing that you can change the outline of markers without changing it of the line, macro or not.
Reply With Quote
  #4  
Old 03-18-2011, 08:48 AM
judicial85 judicial85 is offline Edit Marker Lines VBA 2010 Windows 7 Edit Marker Lines VBA 2010 Office 2010 (Version 14.0)
Advanced Beginner
Edit Marker Lines VBA 2010
 
Join Date: Nov 2010
Posts: 64
judicial85 is on a distinguished road
Default

Macro recorder doesn't pick up any chart formatting changes and "border" and "line" commands seem to talk to different pieces of the chart, but line always seems to trump border...

Just in case, I'd want to clarify... in the "Format Data Series" pop-up, I'm looking to change "Line Style" --> "Width" without (programatically) changing "Marker Line Style" --> "Width" simultaneously.

If it's truly broken, is it possible to alternatively remove "Marker Line Style" "Width" and just display a line? (One can always make the marker sizes large to compensate)
Reply With Quote
  #5  
Old 03-18-2011, 09:30 AM
Kimberly Kimberly is offline Edit Marker Lines VBA 2010 Windows 7 64bit Edit Marker Lines VBA 2010 Office 2010 64bit
Expert
 
Join Date: May 2010
Posts: 517
Kimberly is on a distinguished road
Default

Have you considered using the button on the Design tab to save your chart as a template?
Reply With Quote
  #6  
Old 03-18-2011, 01:09 PM
judicial85 judicial85 is offline Edit Marker Lines VBA 2010 Windows 7 Edit Marker Lines VBA 2010 Office 2010 (Version 14.0)
Advanced Beginner
Edit Marker Lines VBA 2010
 
Join Date: Nov 2010
Posts: 64
judicial85 is on a distinguished road
Default

Briefly, but sometimes the lines are charted in different orders (depends on when data arrives) which means the colors will probably be assigned to the wrong line; the legend should determine the color as opposed to the order they are plotted.

Bryan
Reply With Quote
Reply

Tags
charts, formatting, vba

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Edit Marker Lines VBA 2010 MS Word 2010 / Grid Lines Word4Dick Word 2 10-24-2012 12:23 PM
Edit Marker Lines VBA 2010 Unable to edit a received message w/Outlook 2010 Mona123 Outlook 5 02-22-2012 10:25 AM
MarkAsFinal - 'Edit Anyway' edit popup issue GovindRS PowerPoint 1 06-20-2011 06:43 AM
Edit Marker Lines VBA 2010 'Last edit date' markg2 Word 3 12-26-2010 04:27 PM
One specific paragraph marker problem bubble Word 2 11-06-2009 08:59 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:20 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft