Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 54
Default Text Box Scroll Bar question

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.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 133
Default 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.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 54
Default Text Box Scroll Bar question

On Feb 11, 5:03*am, Daniel.C wrote:
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.- Hide quoted text -


- Show quoted text -


Wow! Hello Daniel. Thanks so very much. It worked!
FYI - I had to change the curline to "0" instead of "1"in order for
the box to go to the very top line.
Also as far as user changes, it worked even better than expected,
because with the sheet protected, I found that the user cannot change
the text at all. That is exactly what I wanted and what I had hoped
for.
Thanks again.
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
Scroll bar adding to text box Ruth Excel Discussion (Misc queries) 2 October 1st 08 04:51 PM
Tab and Scroll Question Roger Excel Discussion (Misc queries) 3 February 1st 08 08:14 PM
Text Box w/Scroll Bar Chip Excel Discussion (Misc queries) 2 December 12th 06 12:08 AM
Change scroll bar to end at end of text not bottom of worksheet?? Garfield Excel Discussion (Misc queries) 2 June 5th 06 11:52 PM
how do I create a "scroll box" for text in excel nunautnunquam Excel Discussion (Misc queries) 1 May 30th 05 06:57 PM


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

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

About Us

"It's about Microsoft Excel"