Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
check format
Hello Is it possible to check the fromat of a text, color and bold, in a cell? Thanks *** Sent via Developersdex http://www.developersdex.com *** |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
check format
Using the Characters.Font property of the cell - something like this
maybe... Dim Status As String With Range("A1").Characters.Font If .Bold Then Status = "Bold, " If .Italic Then Status = Status & "Italic, " If .Strikethrough Then Status = Status & "Strikethrough, " If .Shadow Then Status = Status & "Shadow, " If .OutlineFont Then Status = Status & "OutlineFont, " If .Subscript Then Status = Status & "Subscript, " If .Superscript Then Status = Status & "Superscript, " If .Underline Then Status = Status & "Underline, " Status = Status & "Size=" & .Size & ", " Status = Status & "ColorIndex=" & .ColorIndex End With MsgBox Status -- Rick (MVP - Excel) "Rolf G" wrote in message ... Hello Is it possible to check the fromat of a text, color and bold, in a cell? Thanks *** Sent via Developersdex http://www.developersdex.com *** |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
check format
This will check the font size and wheter the font is bold in range B2.
Sub chkFont() s = Range("B2").Font.Size fs = Range("B2").Font.Bold MsgBox s & " " & fs End Sub "Rolf G" wrote: Hello Is it possible to check the fromat of a text, color and bold, in a cell? Thanks *** Sent via Developersdex http://www.developersdex.com *** |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
check format
To check the color, simply use ColorIndex instead of Size or Bold.
"Rolf G" wrote: Hello Is it possible to check the fromat of a text, color and bold, in a cell? Thanks *** Sent via Developersdex http://www.developersdex.com *** |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
check format
JLGWhiz is correct in using the Font property directly instead of vectoring
through the Characters property. Change the With statement in my posting to this... With Range("A1").Font and use the rest of the code as posted. -- Rick (MVP - Excel) "Rick Rothstein" wrote in message ... Using the Characters.Font property of the cell - something like this maybe... Dim Status As String With Range("A1").Characters.Font If .Bold Then Status = "Bold, " If .Italic Then Status = Status & "Italic, " If .Strikethrough Then Status = Status & "Strikethrough, " If .Shadow Then Status = Status & "Shadow, " If .OutlineFont Then Status = Status & "OutlineFont, " If .Subscript Then Status = Status & "Subscript, " If .Superscript Then Status = Status & "Superscript, " If .Underline Then Status = Status & "Underline, " Status = Status & "Size=" & .Size & ", " Status = Status & "ColorIndex=" & .ColorIndex End With MsgBox Status -- Rick (MVP - Excel) "Rolf G" wrote in message ... Hello Is it possible to check the fromat of a text, color and bold, in a cell? Thanks *** Sent via Developersdex http://www.developersdex.com *** |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
check format
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Check if Conditional Format is True or False / Check cell Color | Excel Worksheet Functions | |||
Check Format | Excel Programming | |||
Check box format | Excel Programming | |||
Cell Format Check | Excel Programming | |||
Check Box Format! | Excel Programming |