+ Reply to Thread
Results 1 to 4 of 4

Changing table border color

Hybrid View

  1. #1
    Mexage
    Guest

    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!

  2. #2
    Franz
    Guest

    Re: Changing table border color

    "Mexage" <Mexage@discussions.microsoft.com>ha scritto nel messaggio
    FFA36373-1CC8-4A7E-B178-3C26A9535CFF@microsoft.com

    > 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)
    ----------------------------------------------------------------------------------------



  3. #3
    Mexage
    Guest

    Re: Changing table border color

    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" <Mexage@discussions.microsoft.com>ha scritto nel messaggio
    > FFA36373-1CC8-4A7E-B178-3C26A9535CFF@microsoft.com
    >
    > > 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)
    > ----------------------------------------------------------------------------------------
    >
    >
    >


  4. #4
    Franz Verga
    Guest

    Re: Changing table border color

    "Mexage" <Mexage@discussions.microsoft.com>ha scritto nel messaggio
    4A786D5F-4D39-4C41-9C09-03B652AFC27C@microsoft.com


    > Thanks anyways Franz.


    Your welcome, thanks for feedback.


    --
    Hoping to be helpful...

    Regards

    Franz Verga

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



+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1