Very wierd one here. I have the standard create spreadsheet code which works fine in Excel 2000 and 2003. In my VFP code I have the option of creating a simple chart using code below
Whenever I create a chart and the user closes the workbook Excel errors and closes. If I don't create a chart it doesn't. The other thing is the error only happens in excel 2000 and not 2003.
My easy solution is put all 2000 users onto 2003 but it would be useful to know if anyone else has experienced this and knows why it happens.
Mark Davies
Warwickshire County Council
Code:
oexcel.Sheets("Score Counts").SELECT
oexcel.Charts.ADD
oexcel.ActiveChart.ChartType = xlBarClustered
oexcel.ActiveChart.SetSourceData(oworkbook.worksheets(1).RANGE(lcRange), xlRows)
oexcel.ActiveChart.Location(xlLocationAsNewSheet, "Q" + ALLTRIM(STR(ROUND(lnQuestion,0))) + "-Chart" )
oexcel.ActiveChart.HasTitle = .T.
oexcel.ActiveChart.HasLegend = .F.
oexcel.ActiveChart.ChartTitle.Characters.TEXT = lcChartTitle
oexcel.ActiveChart.Axes(xlValue, xlPrimary).HasTitle = .T.
oexcel.ActiveChart.Axes(xlValue, xlPrimary).AxisTitle.Characters.TEXT = "Frequency"
Whenever I create a chart and the user closes the workbook Excel errors and closes. If I don't create a chart it doesn't. The other thing is the error only happens in excel 2000 and not 2003.
My easy solution is put all 2000 users onto 2003 but it would be useful to know if anyone else has experienced this and knows why it happens.
Mark Davies
Warwickshire County Council