ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   code to deselect a chart modified by VBA (https://www.excelbanter.com/excel-programming/387158-code-deselect-chart-modified-vba.html)

Brad

code to deselect a chart modified by VBA
 
I have a series of charts on a dedicated chart worksheet with attached VBA
routines to change various inputs for each chart. At the conclusion of the
VBA work, it leaves the chart just worked on "selected" ... with the clear
circles at the corners and chart mid-points indicating such, not the solid
circles.

I tried adding a terminal line in the VBA code, ActiveChart.deselect, and
got an error message. And, I tried ActiveSheet.Shape("Chart 733").Deselect
with the same outcome for a chart named as such.

My thanks in advance for the code I need to add to deselect my charts.

Cheers! Brad



Dave Peterson

code to deselect a chart modified by VBA
 
How about just selecting a cell on that worksheet?

Brad wrote:

I have a series of charts on a dedicated chart worksheet with attached VBA
routines to change various inputs for each chart. At the conclusion of the
VBA work, it leaves the chart just worked on "selected" ... with the clear
circles at the corners and chart mid-points indicating such, not the solid
circles.

I tried adding a terminal line in the VBA code, ActiveChart.deselect, and
got an error message. And, I tried ActiveSheet.Shape("Chart 733").Deselect
with the same outcome for a chart named as such.

My thanks in advance for the code I need to add to deselect my charts.

Cheers! Brad


--

Dave Peterson

Peter T

code to deselect a chart modified by VBA
 
Just to add -

it leaves the chart just worked on "selected"


If "just worked on" means by your code, you are probably including
unnecessary Activate or Select statements that can be removed thereby
leaving user's original selection unchanged.

Regards,
Peter T



"Brad" wrote in message
...
I have a series of charts on a dedicated chart worksheet with attached VBA
routines to change various inputs for each chart. At the conclusion of

the
VBA work, it leaves the chart just worked on "selected" ... with the clear
circles at the corners and chart mid-points indicating such, not the solid
circles.

I tried adding a terminal line in the VBA code, ActiveChart.deselect, and
got an error message. And, I tried ActiveSheet.Shape("Chart 733").Deselect
with the same outcome for a chart named as such.

My thanks in advance for the code I need to add to deselect my charts.

Cheers! Brad






All times are GMT +1. The time now is 05:30 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com