Emptying the clipboard at the end of a sub

  • Thread starter Thread starter DoctorV
  • Start date Start date
D

DoctorV

I have a sub in an Excel workbook on open event that copies data fro
one range to another. Works great except that at the end of the su
their is still data in the clipboard. How can I empty the clipboard a
the end of this sub. Tried sendkeys esc did not work. Thanks

Sheets("A_SUBMISSION").Select
Rows("2:2").Select
Selection.Copy
Sheets("A_EXPORT").Select
Rows("2:2").Select
Range("Z2").Activate
ActiveSheet.Paste
Range("A2").Select
ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
Sheets("Quote_Info").Select
Range("B3").Select
SendKeys ES
 
BTW, you can improve your code by eliminating the selections.
Sheets("A_SUBMISSION").Rows("2:2").Copy _
Sheets("A_EXPORT"),Range("Z2")
application goto Sheets("Quote_Info").Range("B3")
 
I just tested this. You cannot copy a row to z2,
Sub noselect()
Sheets("sourcesheet").Rows(2).Copy _
Sheets("destinationsheet").Range("a2")'or rows(2)
Application.Goto Sheets("sheet3").Range("B3")
End Sub

--
Don Guillett
SalesAid Software
(e-mail address removed)
Don Guillett said:
BTW, you can improve your code by eliminating the selections.
Sheets("A_SUBMISSION").Rows("2:2").Copy _
Sheets("A_EXPORT"),Range("Z2")
application goto Sheets("Quote_Info").Range("B3")
 
Back
Top