normally you'll get the null if you want to return a property
for multiple characters with different formatting.
but as you found within textframes the Fontstyle seems buggy.
However the Bold/Italic etc properties work correctly
Sub foo()
Dim o As Object, f As Font
Set o = Sheet1.Shapes(1).TextFrame
Set f = o.Characters(1, 1).Font
Msgbox f.Bold & vblf & f.Italic
End Sub
--
keepITcool
|
www.XLsupport.com | keepITcool chello nl | amsterdam
Laguna wrote :
I face a problem in detecting bold data in a shape
ActiveSheet.Shapes("Text Box 17").Select
MsgBox Selection.Characters(Start:=i, Length:=1).Font.FontStyle
when i use this similiar code to detect bolded character in a cell,
it works fine.
but when i use this code to detect bolded data in a text box or
rectangle shape
the error " invalid use of null message" appear
how to check bolded data in a shape in Excel 2000