No Borders

Posted on 2012-08-19
Last Modified: 2012-08-19
Could someone please help me in removing all borders from all cells in a sheet using vba?
Question by:Stephen Byrom
    LVL 44

    Accepted Solution

    This should do it in a macro

        Sheet1.Cells.Borders(xlDiagonalDown).LineStyle = xlNone
        Sheet1.Cells.Borders(xlDiagonalUp).LineStyle = xlNone
        Sheet1.Cells.Borders(xlEdgeLeft).LineStyle = xlNone
        Sheet1.Cells.Borders(xlEdgeTop).LineStyle = xlNone
        Sheet1.Cells.Borders(xlEdgeBottom).LineStyle = xlNone
        Sheet1.Cells.Borders(xlEdgeRight).LineStyle = xlNone
        Sheet1.Cells.Borders(xlInsideVertical).LineStyle = xlNone
        Sheet1.Cells.Borders(xlInsideHorizontal).LineStyle = xlNone
    LVL 1

    Author Closing Comment

    by:Stephen Byrom
    Thanks for your time, works a treat!
    LVL 44

    Expert Comment

    by:Martin Liss
    You're welcome and I'm glad I was able to help.

    Marty - MVP 2009 to 2012

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Join & Write a Comment

    Drop Down List with Unique/Distinct Values (enhancing the Combo-Box with a few steps and a little code) David miller (dlmille) Intro Have you ever created a data validation list from a database field or spreadsheet column (e.g., Zip Codes or Co…
    Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
    The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    25 Experts available now in Live!

    Get 1:1 Help Now