Text Box Scroll Bar question
In a standard module, paste :
Public Tb As String
In the "ThisWorkbook" module, paste :
Private Sub Workbook_Open()
Tb = Sheets("Sheet1").TextBox1.Text
End Sub
This will serve to keep the initial value of the textbox.
In the sheet module, paste :
Private Sub TextBox1_Change()
Me.TextBox1 = Tb
End Sub
This will restore the initial text each time it will be modified.
Please note that the text is restored when the textbox loose the focus.
Also, paste :
Private Sub Worksheet_Activate()
TextBox1.Activate
TextBox1.CurLine = 1
Tb = TextBox1.Text
End Sub
to get the beginning of the text of the textbox when the sheet is
selecteed.
HTH
Daniel
Please forgive my posting this in two groups, but I have not had any
response in the Program group, and I need some help.
I am trying to use a text box on a page (not on a User Form), and I
have pre-loaded information in the box, so that it can be scrolled and
viewed by the user. I would like to do the following, but do not know
how to do it, or even if it is possible;
1) I would like to 'lock' the text so that the user cannot change it.
2) I would like the scroll bar to be at the top whenever the worksheet
is accessed.
The worksheet can only be accessed by a macro, so I could use code for
one or both of these things, but I do not know how to approach it. I
would really appreciate some help. Thanks in advance.
|