Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or
0
0
0
s2smodern

How to remove border from text box in Excel?

By default, text box is surrounded by black borders in Excel. If you want to remove border from a text box, how could you do? And how to remove borders from all text boxes in a worksheet or create a text box without border in Excel? This article will introduce methods to help you solve the problems.

Remove border from a text box in Excel

Remove border from all text boxes in current worksheet in Excel

Create a no border text box in Excel


Remove border from a text box in Excel


It is easy to remove border from a text box in Excel with the No Outline feature in Excel. Please do as follows.

1. Select the text box you will remove borders from.

2. Click Format > Shape Outline > No Outline. See screenshot:

Then you can see borders are removed from the selected text box immediately as below screenshot shown.


Remove borders from all text boxes in current worksheet in Excel

The below VBA code can help you to remove borders from all text boxes in current worksheet in Excel. Please do as follows.

1. In the worksheet contains multiple text boxes you will remove borders from, press the Alt + F11 keys to open the Microsoft Visual Basic for Applications window.

2. In the Microsoft Visual Basic for Applications window, click Insert > Module. Then copy below VBA code into the code window.

VBA code: remove borders from all text boxes in current worksheet

Sub DelectTextBoxLine()
'Update by Extendoffice 2018/5/15
    Dim xOle As Shape
    On Error GoTo LableNext
    For Each xOle In ActiveSheet.Shapes
        If xOle.Name Like "TextBox*" Then
            xOle.Line.Visible = msoFalse
        End If
LableNext:
    Next
End Sub

3. Press the F5 key to run the code. Then borders are removed from all text boxes in current worksheet immediately.


Create a no border text box in Excel

Otherwise, you can create a no border text box to avoid removing borders from text box. Please do as follows.

1. In the worksheet you will insert a text box without border, press the Alt + F11 keys to open the Microsoft Visual Basic for Applications window.

2. In the Microsoft Visual Basic for Applications window, click Insert > Module. Then copy below VBA code into the code window.

VBA code: create no border text box in Excel

Sub AddTextbox_NoLine()
'Update by Extendoffice 2018/5/15
    ActiveSheet.Shapes.AddTextbox( _
        msoTextOrientationHorizontal, 90, 90, 180, 180).Line.Visible = msoFalse
End Sub

3. Press the F5 key to run the code.

Then text box with no borders is inserted into current worksheet immediately.


Related articles:


Recommended Productivity Tools

Office Tab

gold star1 Bring handy tabs to Excel and other Office software, just like Chrome, Firefox and new Internet Explorer.

Kutools for Excel

gold star1 Amazing! Increase your productivity in 5 minutes. Don't need any special skills, save two hours every day!

gold star1 200 New Features for Excel, Make Excel Much Easy and Powerful:

  • Merge Cell/Rows/Columns without Losing Data.
  • Combine and Consolidate Multiple Sheets and Workbooks.
  • Compare Ranges, Copy Multiple Ranges, Convert Text to Date, Unit and Currency Conversion.
  • Count by Colors, Paging Subtotals, Advanced Sort and Super Filter,
  • More Select/Insert/Delete/Text/Format/Link/Comment/Workbooks/Worksheets Tools...

Screen shot of Kutools for Excel

btn read more      btn download     btn purchase

Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.

Be the first to comment.