Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default when I create a chart for the first time,

when I create a chart for the first time,
I cannot get to any of the
Chart.SeriesCollection(1).ErrorBars.Border properties.
They all come up "unable to get XXX property of the border class"
then next time I draw a chart, everything is fine.
I even tried the following before trying to set these properties:
Excel.ActiveWorkbook.RefreshAll
ActiveSheet.ChartObjects(1).Chart.Refresh
Calculate
but still cannot see the chart border properties.

Anyone have any ideas?

thanks


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default when I create a chart for the first time,

Try using a ject. Dim to declare a ChartObject. Practice by recording a
macro when building your chart! Then, copy/paste the code that you get into
your macro. It will be something like this:

Sub BuildBigChart()
ActiveSheet.ChartObjects.Delete
Dim myChtObj As ChartObject

Set myChtObj = ActiveSheet.ChartObjects.Add _
(Left:=500, Width:=800, Top:=50, Height:=1500)

myChtObj.Chart.SetSourceData
Source:=Sheets("Sheet1").Range("BeginNamedRange:En dNamedRange")
myChtObj.Chart.ChartType = xlBarClustered

Dim RngToCover As Range
'Do all the formatting and stuff here€¦

End Sub

HTH,
Ryan---



--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"greg" wrote:

when I create a chart for the first time,
I cannot get to any of the
Chart.SeriesCollection(1).ErrorBars.Border properties.
They all come up "unable to get XXX property of the border class"
then next time I draw a chart, everything is fine.
I even tried the following before trying to set these properties:
Excel.ActiveWorkbook.RefreshAll
ActiveSheet.ChartObjects(1).Chart.Refresh
Calculate
but still cannot see the chart border properties.

Anyone have any ideas?

thanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default when I create a chart for the first time,

it does seem like I am creating the chart correctly.
even looking at the properties the haserrorbars = true
just the first time creating the properties for error bars are
unable to get XXX property of the border class

but second time i create a char, its fine.


"ryguy7272" wrote in message
...
Try using a ject. Dim to declare a ChartObject. Practice by recording a
macro when building your chart! Then, copy/paste the code that you get
into
your macro. It will be something like this:

Sub BuildBigChart()
ActiveSheet.ChartObjects.Delete
Dim myChtObj As ChartObject

Set myChtObj = ActiveSheet.ChartObjects.Add _
(Left:=500, Width:=800, Top:=50, Height:=1500)

myChtObj.Chart.SetSourceData
Source:=Sheets("Sheet1").Range("BeginNamedRange:En dNamedRange")
myChtObj.Chart.ChartType = xlBarClustered

Dim RngToCover As Range
'Do all the formatting and stuff here.

End Sub

HTH,
Ryan---



--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"greg" wrote:

when I create a chart for the first time,
I cannot get to any of the
Chart.SeriesCollection(1).ErrorBars.Border properties.
They all come up "unable to get XXX property of the border class"
then next time I draw a chart, everything is fine.
I even tried the following before trying to set these properties:
Excel.ActiveWorkbook.RefreshAll
ActiveSheet.ChartObjects(1).Chart.Refresh
Calculate
but still cannot see the chart border properties.

Anyone have any ideas?

thanks





Reply
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
How do I create a chart that shows different periods of time. Tessa Charts and Charting in Excel 1 January 14th 10 02:18 PM
Create a chart of totals over time? Nellie Nobody Excel Worksheet Functions 1 December 24th 09 03:31 AM
Create two curves with different time histories in same chart? OJ Charts and Charting in Excel 3 January 10th 09 03:30 PM
How to create a time study chart DN Charts and Charting in Excel 1 February 26th 07 11:35 PM
How do i create a pie chart that shows % of time on tasks? John Charts and Charting in Excel 0 December 19th 06 12:49 AM


All times are GMT +1. The time now is 10:38 AM.

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

About Us

"It's about Microsoft Excel"