Microsoft Office Forums Textbox control autosize and mutliline

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-22-2014, 06:52 AM
kogi kogi is offline Textbox control autosize and mutliline Windows 7 64bit Textbox control autosize and mutliline Office 2010 64bit
Novice
Textbox control autosize and mutliline
 
Join Date: Sep 2014
Posts: 2
kogi is on a distinguished road
Default Textbox control autosize and mutliline

Hello everyone,
I am facing the following problem:
A textbox activeX control must be multilined and autosized. When I make these settings though, every time I use the textbox it changes line on every letter I type.



is there any solution for that?

Thanks in advance.
Reply With Quote
  #2  
Old 09-23-2014, 02:22 PM
macropod's Avatar
macropod macropod is offline Textbox control autosize and mutliline Windows 7 64bit Textbox control autosize and mutliline Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 19,544
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

If you want to allow multi-line input and have the width expand to accommodate the number of characters on a line, you need to set:
• AutoSize = True
• Multiline = True
• WordWrap = False
and either set:
• EnterKeyBehaviour = True
or rely on Shift-Enter to insert new lines.

One problem you may experience is the textbox scrolling the top line out of view. Scrolling back to the top should fix that.
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #3  
Old 09-25-2014, 05:25 AM
kogi kogi is offline Textbox control autosize and mutliline Windows 7 64bit Textbox control autosize and mutliline Office 2010 64bit
Novice
Textbox control autosize and mutliline
 
Join Date: Sep 2014
Posts: 2
kogi is on a distinguished road
Default Textbox control autosize and mutliline

Hello macropod,
thanks a lot for the reply. Unfortunately it doesn't work 100% correctly because the user must press enter every time to change line otherwise the text extends the page. I would like the user not to notice that he is writing in an activeX text box though.

I am trying to solve the problem with macro commands but no success yet. Is there any way to take the length of each line in a text box? Then a if case would solve the problem.
Reply With Quote
  #4  
Old 09-25-2014, 06:15 AM
macropod's Avatar
macropod macropod is offline Textbox control autosize and mutliline Windows 7 64bit Textbox control autosize and mutliline Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 19,544
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

In that case, if you want multi-line, why are you also using auto-size as well? Also, why are you using an ActiveX control? It seems to me you could achieve much the same result as you seem to be after via a single-cell table.
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
Reply

Tags
autosize, macro, textbox

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Textbox control autosize and mutliline Find textbox name Hdata Word VBA 17 02-01-2014 06:50 AM
Deleting a table from a content control -- preserving the content control BrainSlugs83 Word Tables 8 11-14-2013 03:06 AM
Textbox control autosize and mutliline Display result in textbox based on the input of another textbox scarymovie Word VBA 5 05-16-2012 07:05 PM
textbox color issue Dave Duncan Word 0 08-07-2011 10:38 AM
Textbox Template t0m46 Word 0 09-07-2010 03:38 AM


All times are GMT -7. The time now is 05:00 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2019 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft