View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
TroyW[_2_] TroyW[_2_] is offline
external usenet poster
 
Posts: 94
Default check the cell format by function or vba code

Give this a try.

Troy

Sub Test_DiagUp()
Dim rngBlock As Range
Dim rngCell As Range

Set rngBlock = Range("A1:G1")

For Each rngCell In rngBlock
If rngCell.Borders(xlDiagonalUp).LineStyle = xlNone Then
MsgBox rngCell.Address & " : xlDiagonalUp = No"
Else
MsgBox rngCell.Address & " : xlDiagonalUp = Yes"
End If
Next rngCell
End Sub


"Joachim" wrote in message
...
Hi,

my system: XL2000/ WIN XP Home

my problem is.
I want to check if in range A1:G1 a cell is formated like this:
I'll hope to find the right words :-)
is a cell stroke through with (FORMAT; CELL;FRAME; from left bottom to
right
top ?)

Is it possible to check this by formular ? or
is there a vba script to check this ?

thanks for any help or information.

best regards Achim