View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
ragtopcaddy via OfficeKB.com ragtopcaddy via OfficeKB.com is offline
external usenet poster
 
Posts: 22
Default Trouble with charts in Excel 2007 - Access 2007/VBA

I discovered why this line doesn't work. There are no additional charts in
the worksheet! The problem actually lies with the following code, which
worked in 2003:

If i < nCount Then 'There is at least one more store to be
reported
.Range(.Cells(N - (conRows - 1), 1), .Cells(N, conCols)).
Select
XLobj.Selection.Copy
.Range(.Cells(N + 1, 1), .Cells(N + conRows, conCols)).Select
XLobj.Selection.Insert
XLobj.CutCopyMode = False
XLobj.ActiveWindow.SelectedSheets.HPageBreaks.Add Befo
=XLobj.ActiveCell
XLobj.ActiveCell.Offset(-conRows, 0).Activate
Else
'use the last blank form for the last store
.Range(.Cells(N - (conRows - 1), 1).Address).Activate
End If

The copy/paste procedure above is no longer including the 10 charts that
exist in the range selected in the worksheet.

ragtopcaddy wrote:
I have the following line of code in an Access module:

Set xlChartObject = XLobj.ActiveSheet.ChartObjects(i + y)

I get error 1004, "Application defined, or object defined error".

This code worked fine in 2003, but refuses to budge in 2007.


--
Bill Reed

"If you can't laugh at yourself, laugh at somebody else"

Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200810/1