Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Better than a text box?

The textbox you use on a userform can be used on a worksheet as well (from
the control toolbox toolbar)

just put it on the worksheet and change the wrap, multiline and scrollbar
properties to reflect the behavior you want. The scrollbar won't appear
until the text exceeds the height of the visible area (given that vertical
scrollbar is enabled). You would need to set these if you used it on a
userform as well.

--
Regards,
Tom Ogilvy


"Fred Holmes" wrote in message
...
I've been using text boxes to post "notes" on my Excel worksheets.
They are fine for short notes but not for long ones. Is there some
sort of construct with a userform that I could try?

1. One could add / delete text to/from it as easily as a text box,
i.e., by directly editing it. No need to go into vba editor mode.

2. The form/control on the form would be of limited height, and one
could read the long text with a vertical scroll bar.

What control should I put on the userform to behave as above?

Thanks,

Fred Holmes



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 112
Default Better than a text box?

What class of objects does a text box created from the Control Toolbox
toolbar belong?

The following code:

Sub ToggleTextBoxes()
Dim bxa As TextBox
For Each bxa In ActiveSheet.TextBoxes
If bxa.Visible = True Then
bxa.Visible = False
Else
bxa.Visible = True
End If
Next bxa
End Sub

will toggle visible/invisible all text boxes created from the Drawing
toobar, but not text boxes created from the Control Toolbox toolbar.
???

Thanks,

Fred Holmes


On Thu, 28 Aug 2003 15:07:36 -0400, "Tom Ogilvy"
wrote:

The textbox you use on a userform can be used on a worksheet as well (from
the control toolbox toolbar)

just put it on the worksheet and change the wrap, multiline and scrollbar
properties to reflect the behavior you want. The scrollbar won't appear
until the text exceeds the height of the visible area (given that vertical
scrollbar is enabled). You would need to set these if you used it on a
userform as well.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Better than a text box?

Dim tbox as MSForms.Textbox
Dim ctrl as OleObject
for each ctrl in Activesheet.OleObjects
if typeof ctrl is MSForms.Textbox
' set tbox = ctrl.Object 'OleObject.object is the textbox
if ctrl.Visible = Not ctrl.Visible
End if
Next

--
Regards,
Tom Ogilvy


Fred Holmes wrote in message
...
What class of objects does a text box created from the Control Toolbox
toolbar belong?

The following code:

Sub ToggleTextBoxes()
Dim bxa As TextBox
For Each bxa In ActiveSheet.TextBoxes
If bxa.Visible = True Then
bxa.Visible = False
Else
bxa.Visible = True
End If
Next bxa
End Sub

will toggle visible/invisible all text boxes created from the Drawing
toobar, but not text boxes created from the Control Toolbox toolbar.
???

Thanks,

Fred Holmes


On Thu, 28 Aug 2003 15:07:36 -0400, "Tom Ogilvy"
wrote:

The textbox you use on a userform can be used on a worksheet as well

(from
the control toolbox toolbar)

just put it on the worksheet and change the wrap, multiline and

scrollbar
properties to reflect the behavior you want. The scrollbar won't appear
until the text exceeds the height of the visible area (given that

vertical
scrollbar is enabled). You would need to set these if you used it on a
userform as well.




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
Using TEXT and &TEXT - display numbers with commas, underline text Gary Excel Discussion (Misc queries) 3 May 5th 23 03:46 AM
using a conditional suffix in text function format syntax=text(value,format_text) Brotherharry Excel Worksheet Functions 1 January 13th 09 03:03 PM
Text does not display in "Text boxs" and when wrapping text in a c Esteban Excel Discussion (Misc queries) 1 March 8th 07 11:59 PM
text (3750 char.)truncates with text wrap and row heigh adjusted? Boydster Excel Discussion (Misc queries) 1 May 19th 05 05:59 PM
extracting text from within a cell - 'text to rows@ equivalent of 'text to columns' Dan E[_2_] Excel Programming 4 July 30th 03 06:43 PM


All times are GMT +1. The time now is 02:24 AM.

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"