View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tim879 Tim879 is offline
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