Thread: Detecting Null
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Detecting Null

Seemed to work for me. At least it worked as I expected.

--
Regards,
Tom Ogilvy


"Zone" wrote in message
ups.com...
I want to detect whether part of the text in a cell is bolded,
underlined, or uses a special font. Rather than slow things down by
looking at each character, I thought I could just detect whether any
part of the text in the cell has one of these attributes since, if only
part of a cell is bold, for instance, the fontstyle for the whole cell
will be null. However, looking at a cell with only part of it bolded
and part of it underlined, I can't seem to detect this with something
like this:
with activecell.font
If IsNull(.Name) Or IsNull(.FontStyle) Or IsNull(.Underline) Or
IsNull(.Bold) Then DetectJ = True
end with

What am I doing wrong? Excel 2002. TIA, James