View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default de-select range in other workbook?

Hi Ron,

After your paste operation add the line:

Application.CutCopyMode = False

---
Regards,
Norman



"Ron" wrote in message
...
Greetings,

I am copying data from one workbook (book1) to another
(book2) like this:

Dim sht As Worksheet
Set sht = Workbooks("Book2").Sheets("Sheet1")
sht.Range("B10:H20").PasteSpecial


So when I go to Book2 I see the data but it is all
highlighted. I tried de-selecting it by saying

sht.Range("A1").Select

after the PastSpecial statement, but that gave me an error
message that the selection failed. Is there a way to do
this in code to de-select a range in a workbook from
another workbook?

Thanks,
Ron