PDA

View Full Version : [SOLVED] Characters



MWE
09-01-2005, 11:57 AM
If one wants to "manage" individual characters within the text of a cell, they can be referenced something like:


With TargetCell.Characters(Start:=1, Length:=6)
.Font = something
etc
End With

According to the object browser, another valid approach is:


Start = 1
Length = 6
With TargetCell.Characters(Start, Length)
etc
End With

The first method works, but the 2nd method generates errors; in particular

Run Time Error 438
Object does not support this property or method
So, what am I doing wrong?

Thanks

Zack Barresse
09-01-2005, 11:59 AM
In your second example, try adding ".Font" afterwards. You must have a property, and Character is not a property (per se).

Killian
09-01-2005, 12:04 PM
Indeed, that should work fine if you use a valid method, like .Font.Size = 14

MWE
09-01-2005, 03:05 PM
Indeed, that should work fine if you use a valid method, like .Font.Size = 14

Thanks to both of you; the problem had nothing to do with Start or Length -- just stupidity on my part