+ Reply to Thread
Results 1 to 13 of 13

Putting borders around cells

  1. #1
    Registered User
    Join Date
    10-14-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    82

    Putting borders around cells

    Hi
    I am trying to put borders around some cells using vba, i will post the code, can someone please have a look, this code only puts it around the rows.

    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor
    Join Date
    11-02-2012
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    564

    Re: Putting borders around cells

    add this.
    Please Login or Register  to view this content.
    Last edited by haripopuri; 06-23-2014 at 08:20 AM. Reason: Updated with Hairline style

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,645

    Re: Putting borders around cells

    That seems to work fine for me, it puts a box like border round the specified range.

    Is that not what you want?
    If posting code please use code tags, see here.

  4. #4
    Registered User
    Join Date
    10-14-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    82

    Re: Putting borders around cells

    I want vertical between columns as well

  5. #5
    Registered User
    Join Date
    10-14-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    82

    Re: Putting borders around cells

    sorry doesnt work properly

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,754

    Re: Putting borders around cells

    Try adding this to your code at the end

    Please Login or Register  to view this content.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  7. #7
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Putting borders around cells

    Works for me?

  8. #8
    Registered User
    Join Date
    10-14-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    82

    Re: Putting borders around cells

    the first code worked well but the line on last row was missing

  9. #9
    Valued Forum Contributor
    Join Date
    11-02-2012
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    564

    Re: Putting borders around cells

    You have to add the code at the end of the code you already have, still last row border missing..?

  10. #10
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,645

    Re: Putting borders around cells

    Is this what you want?
    Please Login or Register  to view this content.

  11. #11
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Putting borders around cells

    Maybe?

    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    10-14-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    82

    Re: Putting borders around cells

    Thanks, its all working

  13. #13
    Valued Forum Contributor
    Join Date
    11-02-2012
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    564

    Re: Putting borders around cells

    Please update the thread as solved, and if we helped you, please add to rep by clicking on star below the post.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Auto change borders to thick borders
    By Pierce Quality in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 11-22-2013, 11:17 PM
  2. Putting borders in word document
    By torofish in forum Word Formatting & General
    Replies: 2
    Last Post: 07-07-2010, 10:23 PM
  3. Borders around cells...
    By syuhas in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-28-2006, 01:20 PM
  4. [SOLVED] problem with putting borders around cells with macro
    By jjfjr in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-20-2005, 01:50 PM
  5. [SOLVED] Help required putting borders around cells.
    By Centurian in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 02-03-2005, 09:06 PM

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