ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   excel 97: copy and paste values from one worksheet to another worksheet (https://www.excelbanter.com/excel-programming/277642-excel-97-copy-paste-values-one-worksheet-another-worksheet.html)

Kathy[_5_]

excel 97: copy and paste values from one worksheet to another worksheet
 
Try activating the sheets first:

Worksheets("FTREGI_FUNDS_MOVE").Select
Range("E2").Select
Selection.Copy
Worksheets("SEIACHDisbursement").Select
Range("A2").Select
ActiveSheet.Paste

-----Original Message-----
Hello

I created a macro in excel 97 that adds new worksheets

within a
workbook and copies and pastes specific cell values from
one cell in sheet1 to another cell in sheet2. When I

ran the macro, I
received an error indicating "the object
doesn't support this property or method - run time error

438."

Any suggestions would be appreciated.
Thanks in advance
Jung


Here is the code with the error:

Sub AddNewWorksheets()

Worksheets.Add
Sheets.Add.Name = "SEITransfer"
Sheets.Add.Name = "SEIWire"
Sheets.Add.Name = "SEIACHReceipt"
Sheets.Add.Name = "SEIACHDisbursement"

End Sub

Sub FundsMovement()

Application.ScreenUpdating = False


ActiveSheet.Name = "SEIACHDisbursement"
Range("A1").Value = "FromAcct"
Range("B1").Value = "FromIncome"
Range("C1").Value = "FromPrincipal"
Range("D1").Value = "DisbursementCode"
Range("E1").Value = "DisbursementExplanation1"
Range("F1").Value = "DisbursementExplanation2"
Range("G1").Value = "DisbursementExplanation3"
Range("H1").Value = "DisbursementExplanation4"
Range("I1").Value = "DisbursementExplanation5"
Range("J1").Value = "Taxid"
Range("K1").Value = "ToENeeded"
Range("L1").Value = "CUSIP"

'copy and paste specific cells from ftregi_funds_move

worksheet
(sheet1)
'to SEIACHDisbursements(sheet2)
Worksheets("FTREGI_FUNDS_MOVE").Range("E2").Copy
Worksheets("SEIACHDisbursement").Range

("A2").Paste '(error on this
line - the object
doesn't support this property or method - run time error

438.)

Application.ScreenUpdating = True

End Sub
.



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

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