Remove Border from VBA text box

jrisebo

Active Member
Joined
Mar 15, 2011
Messages
321
Office Version
  1. 365
Platform
  1. Windows
I want to remove the border from a textbox thats placed by VBA. How do I do that?

Code:
Sub Addtextbox()



         Shapes.Addtextbox(msoTextOrientationHorizontal, _
    Range("textbox_x"), Range("case1x2"), 40, 25) _
    .TextFrame.Characters.Text = Range("TextBox")
 
End Sub
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Code:
Sub Addtextbox()
With ActiveSheet.Shapes.Addtextbox(msoTextOrientationHorizontal, _
    Range("textbox_x"), Range("case1x2"), 40, 25)
    .TextFrame.Characters.Text = Range("TextBox")
    .Line.Visible = msoFalse
End With
End Sub
 
Upvote 0
.
.

Code:
Sub AddTextbox_NoLine()
        
    Const dblLEFT As Double = 90
    Const dblTOP As Double = 90
    Const dblWIDTH As Double = 180
    Const dblHEIGHT As Double = 180
        
    ActiveSheet.Shapes.AddTextbox( _
        msoTextOrientationHorizontal, _
        dblLEFT, _
        dblTOP, _
        dblWIDTH, _
        dblHEIGHT).Line.Visible = msoFalse

End Sub
 
Upvote 0

Forum statistics

Threads
1,223,632
Messages
6,173,472
Members
452,516
Latest member
archcalx

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top