Possible offset issue

B

Barb Reinhardt

Intermittently, I'm getting the "wrong" cell chosen when I use this code

r and myaRange reference a single cell. Once recently, myR was one column
to the right of where it should have been.

Set myR = r.Offset(0, myaRange.Column - r.Column)

I had to change the code to this so that it worked.
Set myR = r.Parent.Cells(r.Row, myaRange.Column)

Has anyone ever seen this before and if so, what's going on?

Thanks,

Barb Reinhardt
 

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