Article ID: 157558
Article Last Modified on 11/23/2006
ActiveWindow.Visible = FalseIn Microsoft Excel 97, you can use the following sample macro to restore the worksheet selection after the chart is deactivated. This macro demonstrates how you can store the selection before activating an embedded chart and how to restore that selection and deactivate the chart.
Sub ChartSelection()
Dim myobj As Object
'Save the current selection in the object variable "myobj".
Set myobj = Selection
'Activate the embedded chart.
ActiveSheet.ChartObjects(1).Activate
'Restore the selection.
myobj.Select
End Sub
Additional query words: XL97 8.0 8.00 de-activate runtime error
Keywords: kbdtacode kbprb KB157558