Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How can I detect if the text in a cell is underlined?
Hello all,
I need to detect if the text in a given cell is underlined or not. I tried: If Sheets("Parts List").Cells(TITLEROW, intC).Underline = xlUnderlineStyleSingle Then But I get: "Object doesn't support this property or method" same with: If Sheets("Parts List").Cells(TITLEROW, intC).Underline.xlUnderlineStyleSingle = True Then I have to admit, at this point I am guessing. Does anyone know the right way to do this? Thank You, -plh -- I keep hitting "Esc" -- but I'm still here! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How can I detect if the text in a cell is underlined?
Jim Cone
San Francisco, USA http://www.realezsites.com/bus/primitivesoftware Function AnySupport(ByRef rngCells As Excel.Range) As Variant Dim varUL As Variant varUL = (rngCells.Font.Underline < xlUnderlineStyleNone) If IsNull(varUL) Then AnySupport = "Some cells are underlined " Else AnySupport = varUL End If Set rngCells = Nothing End Function Sub FindOut() MsgBox AnySupport(Excel.Selection), , " Underlined Font ?" End Sub '------------ "plh" wrote in message Hello all, I need to detect if the text in a given cell is underlined or not. I tried: If Sheets("Parts List").Cells(TITLEROW, intC).Underline = xlUnderlineStyleSingle Then But I get: "Object doesn't support this property or method" same with: If Sheets("Parts List").Cells(TITLEROW, intC).Underline.xlUnderlineStyleSingle = True Then I have to admit, at this point I am guessing. Does anyone know the right way to do this? Thank You, -plh -- I keep hitting "Esc" -- but I'm still here! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How can I detect if the text in a cell is underlined?
Thank You!
-plh In article , Jim Cone says... Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware Function AnySupport(ByRef rngCells As Excel.Range) As Variant Dim varUL As Variant varUL = (rngCells.Font.Underline < xlUnderlineStyleNone) If IsNull(varUL) Then AnySupport = "Some cells are underlined " Else AnySupport = varUL End If Set rngCells = Nothing End Function Sub FindOut() MsgBox AnySupport(Excel.Selection), , " Underlined Font ?" End Sub '------------ "plh" wrote in message Hello all, I need to detect if the text in a given cell is underlined or not. I tried: If Sheets("Parts List").Cells(TITLEROW, intC).Underline = xlUnderlineStyleSingle Then But I get: "Object doesn't support this property or method" same with: If Sheets("Parts List").Cells(TITLEROW, intC).Underline.xlUnderlineStyleSingle = True Then I have to admit, at this point I am guessing. Does anyone know the right way to do this? Thank You, -plh -- I keep hitting "Esc" -- but I'm still here! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to detect if cells text go on other column ? | Excel Programming | |||
how do i detect like text and add corresponding values? | Excel Discussion (Misc queries) | |||
Function to display a cell containing an underlined number | Excel Programming | |||
Finding an underlined character among several characters in a cell | Excel Programming | |||
Loop until underlined border?? | Excel Programming |