#1
|
|||
|
|||
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. |
#2
|
||||
|
||||
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 [Fmr MS MVP - Word] |
#3
|
|||
|
|||
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. |
#4
|
||||
|
||||
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 [Fmr MS MVP - Word] |
Tags |
autosize, macro, textbox |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
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 |
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 |