How do I set selection to Nothing when programming Excel using VBA?
Posted
by Curt
on Stack Overflow
See other posts from Stack Overflow
or by Curt
Published on 2008-11-15T17:18:46Z
Indexed on
2010/03/16
9:16 UTC
Read the original article
Hit count: 253
When I create a graph after using range.copy and range.paste it leaves the paste range selected, and then when I create a graph a few lines later, it uses the selection as the first series in the plot. I can delete the series, but is there a more elegant way to do this? I tried
Set selection = nothing
but it won't let me set selection. I also tried selection.clear, but that just cleared the last cells that were selected, and still added an extra series to the plot.
Curt
© Stack Overflow or respective owner