PC Review


Reply
Thread Tools Rate Thread

Copy / Paste / ESC Key ?

 
 
Walter
Guest
Posts: n/a
 
      2nd Oct 2008
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 With Quote
 
 
 
 
Tim879
Guest
Posts: n/a
 
      2nd Oct 2008
add the following line Application.CutCopyMode = False

On Oct 2, 11:55*am, Walter <Wal...@discussions.microsoft.com> 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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I get copy/paste to copy/paste text and not the whole page =?Utf-8?B?Q2Fyb2wgSi4=?= Microsoft Word Document Management 1 6th May 2005 09:03 PM
Copy and Paste macro needs to paste to a changing cell reference =?Utf-8?B?bG91bG91?= Microsoft Excel Programming 0 24th Feb 2005 10:29 AM
Copy & Paste Object without using the Excel Copy Paste functions =?Utf-8?B?R2Fueg==?= Microsoft Excel New Users 0 10th Mar 2004 07:06 AM
Copy & Paste Object without using the Excel Copy Paste functions =?Utf-8?B?R2Fueg==?= Microsoft Excel Misc 0 10th Mar 2004 07:06 AM
Re: Copy/Paste in Excel prints highlighted cells and does not paste Dave Peterson Microsoft Excel Misc 0 30th Jul 2003 11:08 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:36 AM.