Thread: Copy & Paste
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
MSP77079[_21_] MSP77079[_21_] is offline
external usenet poster
 
Posts: 1
Default Copy & Paste

Your first question was ... How do I select a cell on sheet 1 so tha
the copied area doesn't remain highlighted?

The answer to that question is ... don't "select" it. Just use th
copy command. Try it, you'll like it.

You also wanted to know how to get back to the original sheet that th
user was on. Two different ways to accomplish this:
(1) don't ever leave the original sheet ... you can do the copy an
paste commands from Sheet1 to Sheet2 without ever changing the activ
sheet! Example:
Worksheets("Sheet1").Range("A1:D4").Copy _
destination:=Worksheets("Sheet2").Range("E5")

(2) note the original sheet before you do anything else. Example:
Set origSheet = ActiveSheet
Worksheets("Sheet1").Range("A1:D4").Copy _
destination:=Worksheets("Sheet2").Range("E5")
origSheet.Activat

--
Message posted from http://www.ExcelForum.com