#1   Report Post  
Posted to microsoft.public.excel.misc
bparker
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.misc
Daniel CHEN
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.misc
CWillis
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.misc
bparker
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.misc
CWillis
 
Posts: n/a
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
extra help with transpose Raymond75 Excel Discussion (Misc queries) 0 January 12th 06 03:40 PM
Shade cell according to text? Ltat42a Excel Discussion (Misc queries) 0 January 3rd 06 06:37 PM
Using Concatenate function to generate text in Text Box Mary S. Charts and Charting in Excel 1 December 14th 05 08:55 PM
SUMPRODUCT vs Text??? Ken Excel Worksheet Functions 2 April 9th 05 07:21 PM
Read Text File into Excel Using VBA Willie T Excel Discussion (Misc queries) 13 January 8th 05 12:37 AM


All times are GMT +1. The time now is 07:36 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"