Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Mexage
 
Posts: n/a
Default Changing table border color

I am working in excel 2003. I have various sheets with a number of tables in
each one. I need to change the color of the table borders without doing
anything to the border style. When I try using the Format/Cells option, and
then in the borders tab, I can see the table lines divided with a gray
(generic) style because my selection has different types of styles. When I
change the color, it will not apply the changes because I don't click on the
grayed borders (if I did, it would reset my styles, which is an undesired
effect)

I don't really want to use macros (because I think this should be an easy
task for excel). Gee, I wish I had used styles before starting to design the
worksheet.

Thanks!
  #3   Report Post  
Mexage
 
Posts: n/a
Default

I know I said I didn't want to use macros, but here it is:

Sub changetoblue()
Dim r As Range
Dim o As Border
Application.ScreenUpdating = False
For Each r In Selection
For Each o In r.Borders
If o.LineStyle < xlNone Then
o.Color = RGB(0, 0, 255)
End If
Next o
Next
Application.ScreenUpdating = True
End Sub


As you can see, the macro only changes the border if it exists, but it will
not modify the current border style.

I know that I am doing twice the work needed here because each border gets
checked two times, but as I said, it was only because I really needed to do
this.

Thanks anyways Franz.

"Franz" wrote:

"Mexage" ha scritto nel messaggio


I am working in excel 2003. I have various sheets with a number of
tables in each one. I need to change the color of the table borders
without doing anything to the border style. When I try using the
Format/Cells option, and then in the borders tab, I can see the table
lines divided with a gray (generic) style because my selection has
different types of styles. When I change the color, it will not apply
the changes because I don't click on the grayed borders (if I did, it
would reset my styles, which is an undesired effect)

I don't really want to use macros (because I think this should be an
easy task for excel). Gee, I wish I had used styles before starting
to design the worksheet.


If I have well understood, all tou have to do is to select your table, then
from Format/Cell option select the borders tab, select the style and the
color of the line to apply and *then* click on each side of the rectangle
that represent your table.


--
Hoping to be helpful...

Regards

Franz

----------------------------------------------------------------------------------------
To reply translate from italian InVento (no capital letters)
----------------------------------------------------------------------------------------



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
Problem making versions of a table by changing sourse data in another workbook Dmitry Kopnichev Excel Discussion (Misc queries) 4 April 1st 05 06:44 AM
Changing Fill color choices Steven Excel Discussion (Misc queries) 4 March 2nd 05 04:05 AM
change font color of first cell in data table attached to chart momo Charts and Charting in Excel 2 February 18th 05 01:47 AM
changing proportion of chart and data table Dawn Parks Charts and Charting in Excel 3 January 6th 05 01:18 AM
Changing color in color palette Dave Peterson Setting up and Configuration of Excel 0 December 12th 04 02:39 PM


All times are GMT +1. The time now is 04:59 AM.

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"