Using Select with Range.Cells property

  • Thread starter Thread starter Ralph Heidecke
  • Start date Start date
R

Ralph Heidecke

Can anyone tell me why:

Range(Cells(iNameR, iNameC + 3), Cells(iNameR, iNameC + iCount + 2)).Select

works while:

Range(Cells(iTargetR, iTarDateC)).Select

returns the runtime error '1004' method 'Range' of object '_Global'

TIA
 
Assuming here that iTargetR is an integer between 1 and 65536 and iTarDateC
is an integer between 1 and 256

Try just Cells(iTargetR, iTarDateC).Select
 
Range can not take a single range object as an argument. Range(Range1) is
not legal syntax. Range(Range1,Range2) is. (Rangex represents a range
object).
 

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

Back
Top