LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Chart line width

Thank you both very much!

"Ronald" wrote:

Hi.

From Access I open Excel, export data to a sheet and then create a chart. It
works well, but now I want to make the chart graphics lines thinner.
The code I use to create the chart and graphics lines is shown below.
As you can see I (try to) use
.Chart.SeriesCollection(intField).LineFormat.Weigh t = 1
and
.Chart.SeriesCollection(intField).Shape.Line.Weigh t = 1
to set the width of the line(s), but both give me a 'property or method not
supported' (error 438) error.
I've tried lots of things but I think one of these lines of code must be
close to the answer.

Can anybody help me, please?
Thanks!

Ronald.

This is my code:
.Shapes.AddChart.Select
Set exlChart = .ChartObjects(1)
With [exlChart]
.Chart.SeriesCollection(1).Delete
.Chart.ChartType = xlLineMarkers
If (UBound(varTabel, 2) = 0) Then
'1 data rij
.Chart.Axes(xlCategory).AxisBetweenCategories = True
For intField = 1 To UBound(varTabel, 1)
.Chart.SeriesCollection.NewSeries
.Chart.SeriesCollection(intField).Name = "=Blad1!$" & Chr(65 +
intField) & "$3"
.Chart.SeriesCollection(intField).Values = "=Blad1!$" & Chr(65
+ intField) & "$4"
.Chart.SeriesCollection(intField).XValues = "=Blad1!$A$4"
' .Chart.SeriesCollection(intField).LineFormat.Weigh t = 1
Next intField
Else
'meerdere data rijen
.Chart.Axes(xlCategory).AxisBetweenCategories = False
For intField = 1 To UBound(varTabel, 1)
.Chart.SeriesCollection.NewSeries
.Chart.SeriesCollection(intField).Name = "=Blad1!$" & Chr(65 +
intField) & "$3"
.Chart.SeriesCollection(intField).Values = "=Blad1!$" & Chr(65
+ intField) & "$4:" & Chr(65 + intField) & CStr(UBound(varTabel, 2) + 4)
.Chart.SeriesCollection(intField).XValues = "=Blad1!$A$4:A" &
CStr(UBound(varTabel, 2) + 4)
' .Chart.SeriesCollection(intField).Shape.Line.Weigh t = 1
Next intField
End If

 
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
Setting line width in chart Hakyab Excel Programming 7 December 9th 10 05:24 PM
Excel 2007 chart line width + axis labelling with VBA HB[_2_] Charts and Charting in Excel 6 August 25th 09 01:01 AM
How do I change cell width from line to line? Aachensam Excel Discussion (Misc queries) 3 January 9th 09 03:19 PM
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
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 03:47 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"