ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   .FormulaR1C1="abc" works, .Text="abc" doesn't. WHAT the? (https://www.excelbanter.com/excel-programming/415944-formular1c1%3D-abc-works-text%3D-abc-doesnt-what.html)

[email protected]

.FormulaR1C1="abc" works, .Text="abc" doesn't. WHAT the?
 
That's right:

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

This is chaos.

Please rebut.

***

Gary Keramidas

.FormulaR1C1="abc" works, .Text="abc" doesn't. WHAT the?
 
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.
--


Gary


wrote in message
...
That's right:

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

This is chaos.

Please rebut.

***




Barb Reinhardt

.FormulaR1C1="abc" works, .Text="abc" doesn't. WHAT the?
 
I've never been able to assign anything to ActiveCell.Text. I don't know
why, but it's consistent.
--
HTH,
Barb Reinhardt



" wrote:

That's right:

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

This is chaos.

Please rebut.

***


Per Jessen

.FormulaR1C1="abc" works, .Text="abc" doesn't. WHAT the?
 
You can use ActiveCell.Value= "abc".

Regards,
Per

skrev i meddelelsen
...
That's right:

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

This is chaos.

Please rebut.

***



[email protected]

.FormulaR1C1="abc" works, .Text="abc" doesn't. WHAT the?
 
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.

***

Dave Peterson

.FormulaR1C1="abc" works, .Text="abc" doesn't. WHAT the?
 
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.

wrote:

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.

***


--

Dave Peterson


All times are GMT +1. The time now is 12:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com