#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 148
Default Exit code

hi, I have a quick ? I'm guessing it's easy but I can't find the answer. I
have some code that ends up copying something and then pasting it into a tab
correctly but seems to hang up on it after it pastes with this below:
Select destination and Press Enter or Choose Paste
is there something I can add to it so that it'll get out of that mode?

here's my code
Worksheets(CStr(Trim(wsSource.Range("A12")) & " Platform")).Activate
Range("I7:N19").Select
Selection.Copy
ws.Activate
target.Offset(3, 0).Select
Selection.PasteSpecial Paste:=xlPasteValues
Selection.PasteSpecial Paste:=xlPasteFormats

Thank you!!!!! :
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default Exit code

You probably want:

Application.CutCopyMode = False

at the end of the snippet. That kills the marching ants.


"Heather" wrote in message
...
hi, I have a quick ? I'm guessing it's easy but I can't find the answer. I
have some code that ends up copying something and then pasting it into a
tab
correctly but seems to hang up on it after it pastes with this below:
Select destination and Press Enter or Choose Paste
is there something I can add to it so that it'll get out of that mode?

here's my code
Worksheets(CStr(Trim(wsSource.Range("A12")) & " Platform")).Activate
Range("I7:N19").Select
Selection.Copy
ws.Activate
target.Offset(3, 0).Select
Selection.PasteSpecial Paste:=xlPasteValues
Selection.PasteSpecial Paste:=xlPasteFormats

Thank you!!!!! :



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default Exit code

Worksheets(CStr(Trim(wsSource.Range("A12")) & "
Platform")).Range("I7:N19").Copy
with target.Offset(3, 0)
.PasteSpecial xlPasteValues
..PasteSpecial xlPasteFormats
end with
application.CutCopyMode = False



"Heather" wrote:

hi, I have a quick ? I'm guessing it's easy but I can't find the answer. I
have some code that ends up copying something and then pasting it into a tab
correctly but seems to hang up on it after it pastes with this below:
Select destination and Press Enter or Choose Paste
is there something I can add to it so that it'll get out of that mode?

here's my code
Worksheets(CStr(Trim(wsSource.Range("A12")) & " Platform")).Activate
Range("I7:N19").Select
Selection.Copy
ws.Activate
target.Offset(3, 0).Select
Selection.PasteSpecial Paste:=xlPasteValues
Selection.PasteSpecial Paste:=xlPasteFormats

Thank you!!!!! :

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 148
Default Exit code

thank you :) Works perfectly :)

"Patrick Molloy" wrote:

Worksheets(CStr(Trim(wsSource.Range("A12")) & "
Platform")).Range("I7:N19").Copy
with target.Offset(3, 0)
.PasteSpecial xlPasteValues
.PasteSpecial xlPasteFormats
end with
application.CutCopyMode = False



"Heather" wrote:

hi, I have a quick ? I'm guessing it's easy but I can't find the answer. I
have some code that ends up copying something and then pasting it into a tab
correctly but seems to hang up on it after it pastes with this below:
Select destination and Press Enter or Choose Paste
is there something I can add to it so that it'll get out of that mode?

here's my code
Worksheets(CStr(Trim(wsSource.Range("A12")) & " Platform")).Activate
Range("I7:N19").Select
Selection.Copy
ws.Activate
target.Offset(3, 0).Select
Selection.PasteSpecial Paste:=xlPasteValues
Selection.PasteSpecial Paste:=xlPasteFormats

Thank you!!!!! :

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Exit Code Upon Cancel On Type 8 Input Box FARAZ QURESHI Excel Discussion (Misc queries) 2 March 31st 08 09:22 AM
Execute vba code on cell exit Bill (Unique as my name) Excel Discussion (Misc queries) 2 May 24th 07 03:48 PM
Execute vba code on cell exit Bill (Unique as my name) Excel Programming 2 May 24th 07 04:36 AM
Correct code to Exit Userform, with out Unloading data Corey Excel Programming 13 January 8th 07 12:25 AM
Code to Exit Excel Corey Excel Programming 5 June 17th 06 01:17 AM


All times are GMT +1. The time now is 03:43 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"