Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default Copy / Paste / ESC Key ?

My code sends data from one tab over to a number of tabs. After doing so I
want it to return to the first tab and be ready for the user to press another
button if needed. But right now when I return the row that was copied still
has the squiggly line around it. I do not want the user to have to press the
ESC key so how do I code that in VBA?

Sub PushData_SupplierName()
'
' PushData Macro
' Push all data from Supp_Data tab to all tabs where this supplier appears

Sheets("Supp_Data").Select
Range("A_named_range").Select
Selection.Copy

'Paste data from supplier on Supp_Data tab to tabs shown below
Sheets("Cir_Conn").Select
Range("C2").Select
ActiveSheet.Paste

Sheets("Backshells").Select
Range("C2").Select
ActiveSheet.Paste

'Return cursor to Supp_Data tab
Sheets("Supp_Data").Select

End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 208
Default Copy / Paste / ESC Key ?

add the following line Application.CutCopyMode = False

On Oct 2, 11:55*am, Walter wrote:
My code sends data from one tab over to a number of tabs. *After doing so I
want it to return to the first tab and be ready for the user to press another
button if needed. *But right now when I return the row that was copied still
has the squiggly line around it. *I do not want the user to have to press the
ESC key so how do I code that in VBA?

Sub PushData_SupplierName()
'
' PushData Macro
' Push all data from Supp_Data tab to all tabs where this supplier appears

* * Sheets("Supp_Data").Select
* * Range("A_named_range").Select
* * Selection.Copy

* * 'Paste data from supplier on Supp_Data tab to tabs shown below
* * * * Sheets("Cir_Conn").Select
* * * * Range("C2").Select
* * * * ActiveSheet.Paste

* * * * Sheets("Backshells").Select
* * * * Range("C2").Select
* * * * ActiveSheet.Paste

* * 'Return cursor to Supp_Data tab
* * Sheets("Supp_Data").Select

End Sub


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
Can't Copy and Paste or Paste Special between Excel Workbooks wllee Excel Discussion (Misc queries) 5 April 29th 23 03:43 AM
Automating copy/paste/paste special when row references change Carl LaFong Excel Programming 4 October 8th 07 06:10 AM
help w/ generic copy & paste/paste special routine DavidH[_2_] Excel Programming 5 January 23rd 06 03:58 AM
Excel cut/Paste Problem: Year changes after data is copy and paste Asif Excel Discussion (Misc queries) 2 December 9th 05 05:16 PM
Copy and Paste macro needs to paste to a changing cell reference loulou Excel Programming 0 February 24th 05 10:29 AM


All times are GMT +1. The time now is 03:10 PM.

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

About Us

"It's about Microsoft Excel"