# Solved: A statement in VBA to deselect all that is selected



## tetd (Jul 15, 2011)

Hi

I have a fair few macros that run commands which select/copy objects, graphs, ranges etc. and then pastes them else where. The only issue is when the macro is completed, the selection is till selected, i.e, if I press crl + v, I might paste a graph. However I do not want this to happen, ideally once the macro is done, I would like there to be nothing selected.

I was wondering if there was a simple statement that could do this?

Thanks


----------



## spatha (Jun 20, 2011)

```
Application.CutCopyMode = False
```


----------



## tetd (Jul 15, 2011)

Hi, thanks for replying. 

However that piece of code did not work. 

Any other suggestions?

Thanks


----------



## Keebellah (Mar 27, 2008)

What Application.CutCopyMode = False does is clear the selection for copy and paste,

The selected area remains selected.
I have'nt found a code way to do it except that after I finish a select A1 ir the last filled row

Range("A" & Range("A1").end(xlDown).row +1).select


----------



## tetd (Jul 15, 2011)

Thank you for the explanation, I have now got it too work. That is my biggest issue working with excel, I do not fully understand anything I am doing, as I am only picking things up as I go along. 

Thanks again!


----------



## Keebellah (Mar 27, 2008)

That's the way I started and I'm sure many with me.


----------

