Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Lorenzo Lee   on Dec 28 In MS Office Category.

  
Question Answered By: Oscar Evans   on Dec 28

I HOPE that you are mis-reading the book. :-)

Range.Cell(C3).Cell(C3) is bad syntax.

Range("C3") is perfectly reasonable for a range that you already know as a
string.

You can create a range using two parameters, which represent top left and
bottom right of the area. Either or both of these could be Cells calls.
(But Cells calls have two parameters, not one.) So

Range(Cells(3, 3), Cells(3, 3))

or

Range(Cells(3, "C"), Cells(3, "C"))

will do the same thing, but are certainly not more "correct" and are
definitely less desirable.

If you have the range as a string, use Range(string). If you need to use
variables to supply row or column numbers, then by all means use Cells
calls. To describe a single cell, you use a Cells call without a Range
call; to describe a rectangular area, you can certainly put a couple of
Cells calls into a Range call.

Share: 

 

This Question has 1 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Another VBA question Or get search suggestion and latest updates.


Tagged: