April 2006
Beginner
1114 pages
98h 16m
English
workbook.ActiveChart
Returns a reference to the Chart object that currently has focus in Excel. If some other type of object has focus, returns Nothing. The following code captures a bitmap of the active chart and pastes the image into Microsoft Paint:
If Not (ActiveChart Is Nothing) Then
ActiveChart.CopyPicture xlScreen, xlBitmap, xlScreen
Shell "mspaint.exe", vbNormalFocus
DoEvents
AppActivate "Untitled - Paint", True
SendKeys "^v", True
End IfRead now
Unlock full access