What VBA Stmt Will Deselect a Chart?

  • Thread starter Thread starter SidBord
  • Start date Start date
S

SidBord

I have a macro that works on a chart that the user has
previously selected with his cursor. When the macro exits,
the chart is still selected, which the user views as a
nuisance. I tried using the statement ACTIVECHART.DESELECT
just before exiting my macro, but it always causes an error
1004 saying that the DESELECT failed. What's that all about??
I read somewhere that I could use the
ACTIVECHART.VISIBLE = False statement, but that's REALLY
bad news . . . the chart disappears! Suggestions anyone?
 
If the chart is on a worksheet try selecting one of the cells.
Range("A1").select

Cheers
Andy
 
Suggestion: Turn on the macro recorder, perform the action, and see what
is recorded. Here's what I got:

ActiveWindow.Visible = False
Windows("Book3").Activate
Range("G3").Select

I tweaked it slightly:

ActiveWindow.Visible = False
ActiveCell.Select

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______
 
Back
Top