Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dotted Linestyle is not seen in Print of the excel PariDhillon Excel Discussion (Misc queries) 1 April 25th 08 01:43 PM
Error LineStyle John Ciccone Excel Programming 2 November 22nd 07 01:44 PM
Error LineStyle property of Border Class NevilleT Excel Programming 2 November 1st 07 11:28 AM
What is fastest? "If .LineStyle < xlContinuous ..." or ".LineStyle = xlContinuous" ?? tskogstrom Excel Programming 12 April 16th 07 10:08 AM


All times are GMT +1. The time now is 03:13 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"