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/413748-application-defined-object-defined-error.html)

davegb[_2_]

application defined or object defined error
 
Code doesn't run:

Set r = activesheet.Range("F2")
Set rR = activesheet.Cells(r, r.End(xlDown)) <----- APPLICATION
DEFINED OR OBJECT DEFINED ERROR
rR.NumberFormat = "mm/dd/yy"

I tried putting in .range after activesheet, but that doesn't help
either.
Any suggestions?
Thanks again.

StumpedAgain

application defined or object defined error
 
I don't see a problem with it. I ran it just fine. Are you sure you defined
both r and rR as Range? What are you trying to do with this? Also, I think
you have your row/column mixed up in your second line. With Cells() row
comes first then column so maybe:

Set rR = activesheet.Cells(r.end(xldown), r) ??

What are you after here?

"davegb" wrote:

Code doesn't run:

Set r = activesheet.Range("F2")
Set rR = activesheet.Cells(r, r.End(xlDown)) <----- APPLICATION
DEFINED OR OBJECT DEFINED ERROR
rR.NumberFormat = "mm/dd/yy"

I tried putting in .range after activesheet, but that doesn't help
either.
Any suggestions?
Thanks again.


Dave Peterson

application defined or object defined error
 
Set rR = ActiveSheet.Range(r, r.End(xlDown))

davegb wrote:

Code doesn't run:

Set r = activesheet.Range("F2")
Set rR = activesheet.Cells(r, r.End(xlDown)) <----- APPLICATION
DEFINED OR OBJECT DEFINED ERROR
rR.NumberFormat = "mm/dd/yy"

I tried putting in .range after activesheet, but that doesn't help
either.
Any suggestions?
Thanks again.


--

Dave Peterson


All times are GMT +1. The time now is 06:21 AM.

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