![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Feb 2002
Posts: 15
|
Does anyone know of a way to check to see if any of the four outside borders for cell exists? I can check the line weight but, if it doesn't exist I want to find out.
Thank you, Murph [ This Message was edited by: murphy00 on 2002-05-18 12:29 ] |
|
|
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 4,209
|
Quote:
' ' Function HasBorders(Rg As Range) As Boolean '// Check if Rg has Borders Dim Brd As Borders Set Brd = Rg.Borders If Brd.LineStyle <> -4114 Then HasBorders = False: Exit Function HasBorders = True End Function Sub tester() MsgBox HasBorders(Selection) End Sub |
|
|
|
|
|
|
#3 |
|
New Member
Join Date: Feb 2002
Posts: 15
|
Thank you. Now I can stop banging my head on the keyboard
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|