S
Sean McPoland
Hi y'all
ok please bear with me while I outline the scenario:
Office 2003 SP1
I have:
a scheduled task that executes an Excel worksheet.
The excel sheet has an auto_open macro that runs.
the macro gets data, creates charts and then calls
Powerpoint to transfer charts.
the powerpoint calls are:
The problem statement is:
..Shapes.Paste.Select
This statement does NOT use the data that has been copied
into the clipboard via the ActiveChart.ChartArea.Copy
statement but OPENS EXCEL AGAIN, TWICE.
This of course creates a serious problem as I now have a
recursive call which is invalid and should NOT happen.
How do I know it happens twice: I step through the macro
to the invalid statement press F8 and it opens the Excel
sheet Driver and steps to the auto_open Sub statement, I
then force the cursor to the End Sub statement and click
F8 again, which OPENS EXCEL again, I do the same thing
(force the cursor) and this time the macro returns to the
proper place having correctly pasted the actual chart.
this is a Bug Surely - or can someone help me out in
solving it....even if it is a fudge..willing to pass the
sheet along with data for those brave enough.
Many thanks in advance
Kindest regards
Sean McPoland
ok please bear with me while I outline the scenario:
Office 2003 SP1
I have:
a scheduled task that executes an Excel worksheet.
The excel sheet has an auto_open macro that runs.
the macro gets data, creates charts and then calls
Powerpoint to transfer charts.
the powerpoint calls are:
Code:
For iCht = 1 To 10
Sheets("Chart" & iCht).Select
ActiveChart.ChartArea.Select
ActiveChart.ChartArea.Copy
SlideCount = PPPres.Slides.Count
Set PPSlide = PPPres.Slides.Add(SlideCount + 1,
ppLayoutBlank)
PPApp.ActiveWindow.View.GotoSlide
PPSlide.SlideIndex
With PPSlide
' paste and select the chart picture
.Shapes.Paste.Select
' align the chart
PPApp.ActiveWindow.Selection.ShapeRange.Align
msoAlignCenters, True
PPApp.ActiveWindow.Selection.ShapeRange.Align
msoAlignMiddles, True
With PPApp.ActiveWindow.Selection.ShapeRange
.ScaleWidth 1.15, msoFalse,
msoScaleFromBottomRight
.ScaleHeight 1.15, msoFalse,
msoScaleFromBottomRight
End With
With PPApp.ActiveWindow.Selection.ShapeRange
.ScaleWidth 1.13, msoFalse,
msoScaleFromTopLeft
.ScaleHeight 1.13, msoFalse,
msoScaleFromTopLeft
End With
End With
Next
The problem statement is:
..Shapes.Paste.Select
This statement does NOT use the data that has been copied
into the clipboard via the ActiveChart.ChartArea.Copy
statement but OPENS EXCEL AGAIN, TWICE.
This of course creates a serious problem as I now have a
recursive call which is invalid and should NOT happen.
How do I know it happens twice: I step through the macro
to the invalid statement press F8 and it opens the Excel
sheet Driver and steps to the auto_open Sub statement, I
then force the cursor to the End Sub statement and click
F8 again, which OPENS EXCEL again, I do the same thing
(force the cursor) and this time the macro returns to the
proper place having correctly pasted the actual chart.
this is a Bug Surely - or can someone help me out in
solving it....even if it is a fudge..willing to pass the
sheet along with data for those brave enough.
Many thanks in advance
Kindest regards
Sean McPoland