ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Copy contents to another page (https://www.excelbanter.com/excel-worksheet-functions/181043-copy-contents-another-page.html)

Richard

Copy contents to another page
 
Private Sub Worksheet_SelectionChange(ByVal Target As Range)

Worksheets("Sent to Assembly").Range("a3:c100").EntireRow.Copy
Destination:=Worksheets("Parts Sent to Assembly").Range("a3:c100")

End Sub

This code works fine but I need it to retain the contents on the "Parts Sent
to Assembly" sheet when I delete the contents on the "Sent to Assembly"
sheet. Any suggestions! Thanks in advance!!

Norm[_2_]

Copy contents to another page
 
Can you clarify what you mean by "need it to retain the contents" on the
target sheet? When you copy the data to the target sheet, that data is
independent from the source sheet data so you cannot lose it by deleting the
source sheet. Since the data is retained by default, I'm not sure what
specific problem you are having. I'm guessing that you may be getting the
#REF! error value in some cells on your target sheet. If that's the case,
it means you have a formula in your target sheet that contains a reference
to a cell or cells in the source sheet. When you delete the source sheet,
the formula fails and generates the #REF! value. Can you confirm if this is
what is happening or maybe describe your problem in more detail?

"Richard" wrote in message
...
Private Sub Worksheet_SelectionChange(ByVal Target As Range)

Worksheets("Sent to Assembly").Range("a3:c100").EntireRow.Copy
Destination:=Worksheets("Parts Sent to Assembly").Range("a3:c100")

End Sub

This code works fine but I need it to retain the contents on the "Parts
Sent
to Assembly" sheet when I delete the contents on the "Sent to Assembly"
sheet. Any suggestions! Thanks in advance!!



Richard

Copy contents to another page
 
Whenever I enter data in the "Sent to Assembly" It is copied to the "Parts
sent to Assembly" sheet but... Once the "Sent to Assembly" sheet is cleared
and NEW data is entered in the "Sent to Assembly" sheet that new data from
the "Sent to Assembly" sheet is copied and the old data that was in the
"Parts sent to assembly" is cleared because it is copying the new data. I
need it to keep the old data in the "Parts Sent to Assembly" and to go to the
next blank row for the new data thats entered in the "Sent to Assembly" sheet.

"Norm" wrote:

Can you clarify what you mean by "need it to retain the contents" on the
target sheet? When you copy the data to the target sheet, that data is
independent from the source sheet data so you cannot lose it by deleting the
source sheet. Since the data is retained by default, I'm not sure what
specific problem you are having. I'm guessing that you may be getting the
#REF! error value in some cells on your target sheet. If that's the case,
it means you have a formula in your target sheet that contains a reference
to a cell or cells in the source sheet. When you delete the source sheet,
the formula fails and generates the #REF! value. Can you confirm if this is
what is happening or maybe describe your problem in more detail?

"Richard" wrote in message
...
Private Sub Worksheet_SelectionChange(ByVal Target As Range)

Worksheets("Sent to Assembly").Range("a3:c100").EntireRow.Copy
Destination:=Worksheets("Parts Sent to Assembly").Range("a3:c100")

End Sub

This code works fine but I need it to retain the contents on the "Parts
Sent
to Assembly" sheet when I delete the contents on the "Sent to Assembly"
sheet. Any suggestions! Thanks in advance!!





All times are GMT +1. The time now is 02:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com