.FormulaR1C1="abc" works, .Text="abc" doesn't. WHAT the?

  • Thread starter Thread starter baobob
  • Start date Start date
B

baobob

That's right:

ActiveCell.FormulaR1C1 = "abc" works; ActiveCell.Text = "abc" fails
(with error 424, "Object required").

This is chaos.

Please rebut.

***
 
from help:

Returns or sets the text for the specified object. "Read-only String for the
Range object", read/write String for all other objects.

see the part i enclosed in quotes.
 
I've never been able to assign anything to ActiveCell.Text. I don't know
why, but it's consistent.
 
Thanks to all who replied.

But the question remains unanswered.

If something is read-write, then any property that *gets* to that
something should be read-write. Shouldn't it?

So is MS's having made ActiveCell.Text read-only just a fluke? If not,
what is the rationale?

Thanks again.

***
 
The .text property is what you see in the cell--not the .value.

If you have 543123.2341 and have it formatted as: #,###.00
you'd see: 543,123.23

If you skinny down that columnwidth enough, you'll see ###'s.

I'm not sure what you should happen if you could change the .text property.
Should xl figure out what numberformat/value combination should be applied to
get it?

Should it replace the .formula with a just a string value?

I'm kind of glad that there's a difference between .text and the rest.
 

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