Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
plh plh is offline
external usenet poster
 
Posts: 48
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default 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   Report Post  
Posted to microsoft.public.excel.programming
plh plh is offline
external usenet poster
 
Posts: 48
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to detect if cells text go on other column ? Alex St-Pierre Excel Programming 0 March 29th 06 03:31 PM
how do i detect like text and add corresponding values? Lucy Excel Discussion (Misc queries) 2 December 17th 04 04:59 PM
Function to display a cell containing an underlined number jquiet Excel Programming 2 September 30th 04 01:45 PM
Finding an underlined character among several characters in a cell jquiet Excel Programming 2 September 29th 04 12:43 AM
Loop until underlined border?? Jeff Excel Programming 3 August 19th 04 02:40 PM


All times are GMT +1. The time now is 12:24 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"