View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Just a code check please...

cell(1,1) is short for cell.Item(1,1) Not to be confused with the cells
object (note the "s" on the end)

set cell = Range("B3")
? cell.Item(1,1).Address
$B$3


it could have been myrange if myrange was a reference to a range.
myrange(1,1)

cell(rowoffset, columnoffset). Unlike the offset property (zero based),
these offsets are 1 based. 1,1 refers to the cell itself.

so yes to what you say.

Also, it is the "immediate" window, not the "Intermediate" window - just
for purposes of talking about it to someone else.
It is because you can immediately evaluate a command or instruction.

--
Regards,
Tom Ogilvy


"ste mac" wrote in message
m...
Ah, now I see (I think) ...Tom, the 'B3' in ..set cell =
Range("B3")... becomes ...cell(1,1)...in the code is that right? this
is what I have not been able to understand, I kept thinkingit was
looking at the actual Cells(1,1) which would be A1... this was my
misunderstanding..

never knew about the intermediate window (now that is handy)....

I tried it out in the intermediate window and it was as you said:
$B$3 $C$3 $D$3 $E$3 $F$3
cell(1,1) cell(1,2) cell(1,3) cell(1,4) cell(1,5)

Tom, once again thanks for your help I am really glad asked this
question, learn't a couple of new things from this one.....

cheers

ste