|  | Does borders exist ? |  | |
| | | PdeC |  |
| Posted: Tue Sep 02, 2008 11:11 am Post subject: Does borders exist ? |  |
Hello. I wish to write a macro that tells me if a cell has a border and if this border is a left one or a bottom one or both. Thanks for an help.
Pierre |
| |
| | | Dave Peterson |  |
| Posted: Tue Sep 02, 2008 12:26 pm Post subject: Re: Does borders exist ? |  |
Option Explicit Sub testme() With ActiveSheet.Range("a1") If .Borders(xlEdgeLeft).LineStyle = xlNone Then MsgBox "No left border" End If If .Borders(xlEdgeBottom).LineStyle = xlNone Then MsgBox "No bottom border" End If End With End Sub
PdeC wrote:
| Quote: | Hello. I wish to write a macro that tells me if a cell has a border and if this border is a left one or a bottom one or both. Thanks for an help.
Pierre
|
--
Dave Peterson |
| |
| | | PdeC |  |
| Posted: Tue Sep 02, 2008 12:58 pm Post subject: Re: Does borders exist ? |  |
Thaks a lot. Pierre
Dave Peterson a écrit :
| Quote: | Option Explicit Sub testme() With ActiveSheet.Range("a1") If .Borders(xlEdgeLeft).LineStyle = xlNone Then MsgBox "No left border" End If If .Borders(xlEdgeBottom).LineStyle = xlNone Then MsgBox "No bottom border" End If End With End Sub
PdeC wrote: Hello. I wish to write a macro that tells me if a cell has a border and if this border is a left one or a bottom one or both. Thanks for an help.
Pierre
|
|
| |
|
|