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 f
None of the many answers with Application.CutCopyMode
or .Select
worked for me.
But I did find a solution not posted here, which worked fantastically for me!
From StackExchange SuperUser: Excel VBA “Unselect” wanted
If you are really wanting 'nothing selected`, you can use VBA to protect the sheet at the end of your code execution, which will cause nothing to be selected. You can either add this to a macro or put it into your VBA directly.
Sub NoSelect()
With ActiveSheet
.EnableSelection = xlNoSelection
.Protect
End With
End Sub
As soon as the sheet is unprotected, the cursor will activate a cell.
Hope this helps someone with the same problem!