application defined or object defined error

D

davegb

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.
 
S

StumpedAgain

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?
 
D

Dave Peterson

Set rR = ActiveSheet.Range(r, r.End(xlDown))
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top