G
Guest
Hello,
I want to present three line-curves over a number of weeks. And I have the
following code in my VB-program:
ReDim WeekAxis(1 To iLastWeek) As Integer
..... (calculate ranges)
' Create Chart on new Worksheet (Left, Top, Width, Height)
Set ch = Worksheets("TempGraph").ChartObjects.Add(5, 5, 600, 350)
ch.Chart.ChartWizard Source:=Worksheets("TempGraph").Range("a60:t62"), _
gallery:=xlLine, Title:="Deliverables versus time"
ch.Chart.SetSourceData Source:=Worksheets("TempGraph").Range("A60"). _
Resize(cNumRows, iNumCols)
' X-axis title and Category
With ch.Chart.Axes(xlCategory)
.CategoryNames = WeekAxis
.HasTitle = True
.AxisTitle.Text = "Week"
End With
The problem is when I dimension my "WeekAxis" variable:
- When "iLastWeek" is 59 or less everything works OK
But
- When "iLastWeek" is 60 or more I get an error
Has anybody any ideas about this?
Do you need more info to understand my problem?
/konpego
I want to present three line-curves over a number of weeks. And I have the
following code in my VB-program:
ReDim WeekAxis(1 To iLastWeek) As Integer
..... (calculate ranges)
' Create Chart on new Worksheet (Left, Top, Width, Height)
Set ch = Worksheets("TempGraph").ChartObjects.Add(5, 5, 600, 350)
ch.Chart.ChartWizard Source:=Worksheets("TempGraph").Range("a60:t62"), _
gallery:=xlLine, Title:="Deliverables versus time"
ch.Chart.SetSourceData Source:=Worksheets("TempGraph").Range("A60"). _
Resize(cNumRows, iNumCols)
' X-axis title and Category
With ch.Chart.Axes(xlCategory)
.CategoryNames = WeekAxis
.HasTitle = True
.AxisTitle.Text = "Week"
End With
The problem is when I dimension my "WeekAxis" variable:
- When "iLastWeek" is 59 or less everything works OK
But
- When "iLastWeek" is 60 or more I get an error
Has anybody any ideas about this?
Do you need more info to understand my problem?
/konpego