ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Application-defined or Object-defined error (https://www.excelbanter.com/excel-programming/371336-application-defined-object-defined-error.html)

[email protected]

Application-defined or Object-defined error
 
How do I fix the "Application-defined or Object-defined error" at the
"Activecell.Formula =" line?


nrow = Sheets("Data Entry").Range("A8").Value
Z = 11
mycell = "B" & Z
Range("A1").Select
Range("A1:J10").Copy
For I = 1 To nrow
ActiveCell.Offset(10, 0).Select
ActiveSheet.Paste
Next I
Range("c15").Select
For I = 1 To nrow
ActiveCell.Formula = "=+'Data Entry'![" & mycell & "]"
Z = Z + 1
mycell = "B" & Z
ActiveCell.Offset(10, 0).Select
Next I


Bob Phillips

Application-defined or Object-defined error
 
Does this fix it?

ActiveCell.Formula = "='Data Entry'!" & mycell & ""


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

wrote in message
ups.com...
How do I fix the "Application-defined or Object-defined error" at the
"Activecell.Formula =" line?


nrow = Sheets("Data Entry").Range("A8").Value
Z = 11
mycell = "B" & Z
Range("A1").Select
Range("A1:J10").Copy
For I = 1 To nrow
ActiveCell.Offset(10, 0).Select
ActiveSheet.Paste
Next I
Range("c15").Select
For I = 1 To nrow
ActiveCell.Formula = "=+'Data Entry'![" & mycell & "]"
Z = Z + 1
mycell = "B" & Z
ActiveCell.Offset(10, 0).Select
Next I





All times are GMT +1. The time now is 07:37 AM.

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