ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   check the cell format by function or vba code (https://www.excelbanter.com/excel-programming/325821-check-cell-format-function-vba-code.html)

Joachim[_2_]

check the cell format by function or vba code
 
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



TroyW[_2_]

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






All times are GMT +1. The time now is 01:35 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com