Deselecting range on an inactive sheet after copy-paste

  • Hi all, looking for a more elegant way to do something really simple..


    After copying and pasting a range on an inactive sheet that range remains selected after the code is done running and the user activates that sheet. Is there an easy way to select, say, cell A1 without activating the sheet affected by the copy-paste macro?

  • Re: Deselecting range on an inactive sheet after copy-paste


    Thanks Kenneth, tried that before, but it didn't do the trick for some reason.. Probably because I'm also inserting columns - are you aware of any code that might clear selection resulting from inserting columns? As in:


    Code
    .Columns("AA:AB").Insert Shift:=xlToRight
  • Re: Deselecting range on an inactive sheet after copy-paste


    thanks Kenneth, but the sheet is inactive and I cannot run a regular selection on it. I can activate the sheet and then activate another, but wanted to avoid all the hassle is possible.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!