Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 2002 - Borders(xlInsideVertical).LineStyle=xlcontinuous notworking
I have excel 2002 running in my server.
I tried to format a sheet with macro. The sheet.range.borderaround xlcontinuous is working but sheet.range.borders(xlinsidevertical).linestyle=xl continuous is not working is there any other way to do the above formatting? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 2002 - Borders(xlInsideVertical).LineStyle=xlcontinuous not working
Try it using Cells; something like this...
Worksheets("Sheet1").Range("C5:F8").Cells.Borders( xlInsideVertical).LineStyle = xlContinuous Rick "Yajiv" wrote in message ... I have excel 2002 running in my server. I tried to format a sheet with macro. The sheet.range.borderaround xlcontinuous is working but sheet.range.borders(xlinsidevertical).linestyle=xl continuous is not working is there any other way to do the above formatting? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 2002 - Borders(xlInsideVertical).LineStyle=xlcontinuous not working
I meant to add... the idea being that without "Cells", Borders refers to the
border around the specified range; with "Cells", Borders refers to the border around individual cells within the range. Rick "Rick Rothstein (MVP - VB)" wrote in message ... Try it using Cells; something like this... Worksheets("Sheet1").Range("C5:F8").Cells.Borders( xlInsideVertical).LineStyle = xlContinuous Rick "Yajiv" wrote in message ... I have excel 2002 running in my server. I tried to format a sheet with macro. The sheet.range.borderaround xlcontinuous is working but sheet.range.borders(xlinsidevertical).linestyle=xl continuous is not working is there any other way to do the above formatting? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 2002 - Borders(xlInsideVertical).LineStyle=xlcontinuous not working
Hi Rick,
With your example that changes the inside borders it wouldn't make any difference to use .Range("C5:F8").Cells.etc or .Range("C5:F8").etc. When applying 'inside' borders each area in the range must include at least two columns or two rows if applying vertical or horizontal borders respectively. The four 'edge' borders and 'diagonal' borders can be applied to any size range, even a single cell. The OP's code and objective was somewhat vague and ambiguous, but maybe the above explains why it is failing. Or maybe if the objective is to apply the format to the entire sheet - ws.Cells.Borders(xlInsideVertical).LineStyle = xlContinuous where 'ws' is a reference to the worksheet. Regards, Peter T "Rick Rothstein (MVP - VB)" wrote in message ... I meant to add... the idea being that without "Cells", Borders refers to the border around the specified range; with "Cells", Borders refers to the border around individual cells within the range. Rick "Rick Rothstein (MVP - VB)" wrote in message ... Try it using Cells; something like this... Worksheets("Sheet1").Range("C5:F8").Cells.Borders( xlInsideVertical).LineStyl e = xlContinuous Rick "Yajiv" wrote in message ... I have excel 2002 running in my server. I tried to format a sheet with macro. The sheet.range.borderaround xlcontinuous is working but sheet.range.borders(xlinsidevertical).linestyle=xl continuous is not working is there any other way to do the above formatting? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Dotted Linestyle is not seen in Print of the excel | Excel Discussion (Misc queries) | |||
Error LineStyle | Excel Programming | |||
Error LineStyle property of Border Class | Excel Programming | |||
What is fastest? "If .LineStyle < xlContinuous ..." or ".LineStyle = xlContinuous" ?? | Excel Programming |