Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
BorderAround won't go away
Can someone explain why I still have a xlThick border around my range after I
run this procedu Sub brdrs() Range("C3:G8").BorderAround Weight:=xlThick, _ ColorIndex:=xlColorIndexAutomatic MsgBox "Check Border" Range("C3:G8").BorderAround LineStyle:=-4142 Range("C3:G8").BorderAround LineStyle:=xlLineStyleNone Range("C3:G8").BorderAround LineStyle:=xlNone End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
BorderAround won't go away
The VBA help instructions are misleading. The correct syntax should be
Range("C3:G8").Borders.LineStyle = xlNone "JLGWhiz" wrote: Can someone explain why I still have a xlThick border around my range after I run this procedu Sub brdrs() Range("C3:G8").BorderAround Weight:=xlThick, _ ColorIndex:=xlColorIndexAutomatic MsgBox "Check Border" Range("C3:G8").BorderAround LineStyle:=-4142 Range("C3:G8").BorderAround LineStyle:=xlLineStyleNone Range("C3:G8").BorderAround LineStyle:=xlNone End Sub |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
BorderAround won't go away
It's counterintuitive, but you have to remove them individually:
Sub brdrs() With Range("C3:G8") .BorderAround Weight:=xlThick, ColorIndex:=xlColorIndexAutomatic MsgBox "Check Border" .Borders(xlEdgeLeft).LineStyle = xlNone .Borders(xlEdgeTop).LineStyle = xlNone .Borders(xlEdgeBottom).LineStyle = xlNone .Borders(xlEdgeRight).LineStyle = xlNone End With End Sub __________________________________________________ ___________________ "JLGWhiz" wrote in message ... Can someone explain why I still have a xlThick border around my range after I run this procedu Sub brdrs() Range("C3:G8").BorderAround Weight:=xlThick, _ ColorIndex:=xlColorIndexAutomatic MsgBox "Check Border" Range("C3:G8").BorderAround LineStyle:=-4142 Range("C3:G8").BorderAround LineStyle:=xlLineStyleNone Range("C3:G8").BorderAround LineStyle:=xlNone End Sub |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
BorderAround won't go away
Sub brdrs()
Range("C3:G8").BorderAround Weight:=xlThick, _ ColorIndex:=xlColorIndexAutomatic MsgBox "Check Border" Range("C3:G8").Borders.LineStyle = xlNone End Sub -- Don Guillett SalesAid Software "JLGWhiz" wrote in message ... Can someone explain why I still have a xlThick border around my range after I run this procedu Sub brdrs() Range("C3:G8").BorderAround Weight:=xlThick, _ ColorIndex:=xlColorIndexAutomatic MsgBox "Check Border" Range("C3:G8").BorderAround LineStyle:=-4142 Range("C3:G8").BorderAround LineStyle:=xlLineStyleNone Range("C3:G8").BorderAround LineStyle:=xlNone End Sub |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
BorderAround won't go away
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Clear BorderAround in VBA | Excel Discussion (Misc queries) | |||
BorderAround method failure | Excel Programming | |||
Range.BorderAround(xlLineStyleNone) | Excel Programming |