Adjusting height of an active x control text box

dpaton05

Well-known Member
Joined
Aug 14, 2018
Messages
2,362
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Is it possible to increase the height of a active x control text box as you type in it. This would mean that it appears to expand downwards. I tried the auto size feature but this just shrunk the text to squeeze it all in when you deselect the text box.Is it possible to make it just stay expanded when you deselect it so you can see everything you have typed?
 
Last edited:

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
I guess you are referring to a textbox embedeed in a worksheet not a textbox on a userform.

If that is the case then give this a try and see if it works for you :
Code:
Private Sub TextBox1_LostFocus()
 TextBox1.Height = TextBox1.Height
End Sub

Change TextBox name as required.

EDIT:
Obviously, you need to set the TextBox AutoSize and Multiline Properties .
 
Last edited:
Upvote 0
It is a little slow at responding to type in and delete text. Is there a way to speed it up?
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,906
Members
452,366
Latest member
TePunaBloke

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