Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Border Problem
In a worksheet, I have borders around cells C5 and E8 and F4 and each cell in
D15:G19. When I run: Sub next_tryx() Range("A1:G19").Borders(xlEdgeBottom).LineStyle = xlNone End Sub The only borders that get cleared are the ones on the last row (D19:G19). Why not the others? -- Gary''s Student - gsnu200773 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Border Problem
Hey GS, you probably have to use xlInsideHorizontal.
"Gary''s Student" wrote: In a worksheet, I have borders around cells C5 and E8 and F4 and each cell in D15:G19. When I run: Sub next_tryx() Range("A1:G19").Borders(xlEdgeBottom).LineStyle = xlNone End Sub The only borders that get cleared are the ones on the last row (D19:G19). Why not the others? -- Gary''s Student - gsnu200773 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Border Problem
P.S. extend your lower row by one to incorporate the last row of the range
you want to execute. "Gary''s Student" wrote: In a worksheet, I have borders around cells C5 and E8 and F4 and each cell in D15:G19. When I run: Sub next_tryx() Range("A1:G19").Borders(xlEdgeBottom).LineStyle = xlNone End Sub The only borders that get cleared are the ones on the last row (D19:G19). Why not the others? -- Gary''s Student - gsnu200773 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Border Problem
You specified xlEdgeBottom for the the specific box surrounding A1:G19, not all the edges for the various bordered areas inside. I think this should do what you want... Range("A1:G19").Borders.LineStyle = xlLineStyleNone Rick "Gary''s Student" wrote in message ... In a worksheet, I have borders around cells C5 and E8 and F4 and each cell in D15:G19. When I run: Sub next_tryx() Range("A1:G19").Borders(xlEdgeBottom).LineStyle = xlNone End Sub The only borders that get cleared are the ones on the last row (D19:G19). Why not the others? -- Gary''s Student - gsnu200773 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Border Problem
I think because xlEdgeLeft, xlEdgeTop, etc. are independent properties and
borders of e.g. C5 are xlInsideVertical and xlInsideHorizontal relative to Range("A1:G19"). You should use With Range("A1:G19") .Borders(xlEdgeLeft).LineStyle = xlNone .Borders(xlEdgeTop).LineStyle = xlNone .Borders(xlEdgeBottom).LineStyle = xlNone .Borders(xlEdgeRight).LineStyle = xlNone .Borders(xlInsideVertical).LineStyle = xlNone .Borders(xlInsideHorizontal).LineStyle = xlNone End With if you want to remove all borders. Regards, Stefi €˛Gary''s Student€¯ ezt Ć*rta: In a worksheet, I have borders around cells C5 and E8 and F4 and each cell in D15:G19. When I run: Sub next_tryx() Range("A1:G19").Borders(xlEdgeBottom).LineStyle = xlNone End Sub The only borders that get cleared are the ones on the last row (D19:G19). Why not the others? -- Gary''s Student - gsnu200773 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Problem with printing a border in Excel 2007 | Excel Discussion (Misc queries) | |||
Border Problem | Excel Discussion (Misc queries) | |||
Cell border problem | Excel Discussion (Misc queries) | |||
Default Border Color Problem | Excel Discussion (Misc queries) | |||
Border problem with one row but no snag in many rows | Excel Programming |