![]() |
Scrolling TextBox...?
Hi,
Does Excel offer any type of scrolling text box? Thank you, Robert Stober |
Scrolling TextBox...?
Hi Robert
The controls toolbox has a textbox for use in spreadsheets and userforms. Set its Multiline to true, Wordwrap to true and Scrollbars to whichever desired. -- HTH. Best wishes Harald Followup to newsgroup only please "Robert Stober" skrev i melding ... Hi, Does Excel offer any type of scrolling text box? Thank you, Robert Stober |
Scrolling TextBox...?
Watch for linewrap. Adds a TextBox with scrolling capability.
Sub FileIntoTextBox() '' Adds a text box which has a scroll bar. Dim txtBox As MSForms.TextBox Dim oleTB As OLEObject Dim wSht As Worksheet Dim wBk As Workbook Application.ScreenUpdating = False [a1].Select Set wBk = ActiveWorkbook Set wSht = wBk.ActiveSheet Set oleTB = wSht.OLEObjects.Add(ClassType:="Forms.TextBox.1", link:=False, _ DisplayAsIcon:=False, Left:=1, Top:=1, Width:=600, Height:=150) With oleTB .Visible = True .Name = "MyTextBox" End With Set txtBox = oleTB.Object With txtBox .Top = ActiveWindow.VisibleRange.Top + 100 .Left = ActiveWindow.VisibleRange.Left + 100 .MultiLine = True .ScrollBars = 2 .EnterKeyBehavior = True .Font.Name = "Courier New" .Font.Size = 8 .SelStart = 1 End With End Sub Tested using Excel 97SR2 on Windows 98SE, HTH Paul -------------------------------------------------------------------------------------------------------------- Be advised to back up your WorkBook before attempting to make changes. -------------------------------------------------------------------------------------------------------------- Hi, Does Excel offer any type of scrolling text box? Thank you, Robert Stober |
All times are GMT +1. The time now is 03:25 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com