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 |
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. |
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. |
All times are GMT +1. The time now is 03:10 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com