Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Text Box
Can you make a text box resize automatically when you type in more info than can fit? What about using a large cell instead of a text box? Can you make it resize automatically to wrap and fit it all into view? Thanks, Brad -- bparker ------------------------------------------------------------------------ bparker's Profile: http://www.excelforum.com/member.php...o&userid=34940 View this thread: http://www.excelforum.com/showthread...hreadid=546820 |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Text Box
For text box:
In the format-alignment - check the box for "automatic size" -- Best regards, --- Yongjun CHEN ================================= XLDataSoft - Data Analysis Expert, Excel/VBA Specialist - - - - www.XLDataSoft.com - - - - Free Excel-Based Data Processing Tool is Available for Download Free Excel / VBA Training Materials is Available for Download ================================= "bparker" wrote in message ... Can you make a text box resize automatically when you type in more info than can fit? What about using a large cell instead of a text box? Can you make it resize automatically to wrap and fit it all into view? Thanks, Brad -- bparker ------------------------------------------------------------------------ bparker's Profile: http://www.excelforum.com/member.php...o&userid=34940 View this thread: http://www.excelforum.com/showthread...hreadid=546820 |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Text Box
Brad,
If the automatic size button was the answer to your question, ignore the rest of this. I worked all day on something similar. (It shouldn't have taken all day, but I'm just beginning.) The following code resizes what is typed into a text box, pastes it in another cell, and then goes back and reformats the original text box it came from. This is probably more than you are looking for, but reworking and naming some of the code may help you out. Dim variable Sub ProdResSummaryTextBox() '''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''' 'This fills in and formats the summary text box on the Prod. Res. tab' 'and copies and formats it to the Summ. tab. ' '''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''' 'Finding out the appropriate dimensions for the text box Sheets("Prod. Res.").Activate Sheets("Prod. Res.").Shapes("ProdResTextBox1").Select Selection.Copy With Selection .AutoSize = True variable = .Width End With '''''''''''''''''''''''''''''''''''''''''''''''' 'Changing the dimensions of the Summ text box ' '''''''''''''''''''''''''''''''''''''''''''''''' Sheets("Summ").Select ''''''''Testing''''''''''' 'If ActiveSheet.Shapes("SummTextBox1").Value Then 'ActiveSheet.Shapes("SummTextBox1").Select 'Selection.Delete 'End If '''''''''''''''''''''''''''''' ActiveSheet.Range("A46").Select ActiveSheet.Paste With Selection .Name = "SummTextBox1" .ShapeRange.LockAspectRatio = msoFalse .ShapeRange.Height = (variable / 650) * 15 + 15 .ShapeRange.Width = 650# End With ''''''''''''''''''''''''''''''''''''''''''''''''' 'Changing the dimension on the original text box' ''''''''''''''''''''''''''''''''''''''''''''''''' Sheets("Prod. Res.").Activate Sheets("Prod. Res.").Shapes("ProdResTextBox1").Select With Selection .AutoSize = False .ShapeRange.LockAspectRatio = msoFalse .ShapeRange.Height = (variable / 650) * 15 + 15 .ShapeRange.Width = 650# End With End Sub "bparker" wrote: Can you make a text box resize automatically when you type in more info than can fit? What about using a large cell instead of a text box? Can you make it resize automatically to wrap and fit it all into view? Thanks, Brad -- bparker ------------------------------------------------------------------------ bparker's Profile: http://www.excelforum.com/member.php...o&userid=34940 View this thread: http://www.excelforum.com/showthread...hreadid=546820 |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Text Box
Thanks for your help! The automatic size thing is nice, but it makes it all one very long line! Can I set a maximum horizontal size so that it will automatically size vertically, adding lines where more are needed??? Brad -- bparker ------------------------------------------------------------------------ bparker's Profile: http://www.excelforum.com/member.php...o&userid=34940 View this thread: http://www.excelforum.com/showthread...hreadid=546820 |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Text Box
Sorry, not that I could figure out. In the code, I just set the horizontal
distance I wanted. Then, I found the width of the one very long line. From there, I calculated the approximate verticle size. So no, I don't know how to do it automatically, but the code I displayed does what I described above. "bparker" wrote: Thanks for your help! The automatic size thing is nice, but it makes it all one very long line! Can I set a maximum horizontal size so that it will automatically size vertically, adding lines where more are needed??? Brad -- bparker ------------------------------------------------------------------------ bparker's Profile: http://www.excelforum.com/member.php...o&userid=34940 View this thread: http://www.excelforum.com/showthread...hreadid=546820 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
extra help with transpose | Excel Discussion (Misc queries) | |||
Shade cell according to text? | Excel Discussion (Misc queries) | |||
Using Concatenate function to generate text in Text Box | Charts and Charting in Excel | |||
SUMPRODUCT vs Text??? | Excel Worksheet Functions | |||
Read Text File into Excel Using VBA | Excel Discussion (Misc queries) |