View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary L Brown Gary L Brown is offline
external usenet poster
 
Posts: 219
Default Test if cell has diagonal borders

If Range("C5").Borders(xlDiagonalDown).LineStyle < xlNone Then
MsgBox "Yes"
End If

If Range("C5").Borders(xlDiagonalUp).LineStyle < xlNone Then
MsgBox "Yes"
End If

HTH,
--
Gary Brown

If this post was helpful, please click the ''''Yes'''' button next to
''''Was this Post Helpfull to you?".


"Brad" wrote:

Thanks for taking the time to read my question.

I want to test if a cell has diagonal borders. How do I do this?

I tried:

If Range("C5").Borders(xlDiagonalDown) = True Then
MsgBox "Yes"
End If

but it didn't work.

Thanks for your help.

Brad