Control Button is still selected after macro runs

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

I have a command button with code to copy selected data
from Sheet1 (list) to Sheet2 (Report).
Before ending the sub, a range named "Date" is selected on
the Report.
However, when I return to Sheet1, the command button is
still selected and not a cell.
How can I design the code so that command buttons are not
still selected after it's sub has finished?
Thanks for the help.

Dave
 
End your code with
activewindow.RangeSelection.Select

this will return you to the previous selection
Bob Umlas
Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top