Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default How to get autoscroll in a multiline textbox?

Hi all.
I'd like add to my application a locked textbox where i show what the user
does (example: You have added x value, You have modified y parameter etc). My
text box has the multiline property set to true and the scrollbars set to
VerticalScrollBar.
Unfortunately the bar appears only if the textbox get the focus but in this
case also I don't get the automatic 1 row up scrolling. The effect I want is
what of end titles of a movie. Hoping my explanation be clear wait your
suggestions or advices.
Thank you in advance.

Nicola
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default How to get autoscroll in a multiline textbox?

Hi Nicola,

In XL2003 I have created this:

Option Explicit

Private Sub Worksheet_Change(ByVal target As Range)
txtLog.Text = txtLog.Text & vbNewLine & "Value of " & _
target.Address & " changed into " &
target.Value
GotoLastLine target
End Sub

Private Sub Worksheet_SelectionChange(ByVal target As Range)
txtLog.Text = txtLog.Text & vbNewLine & "Selection changed to " &
target.Address
GotoLastLine target
End Sub

Private Sub GotoLastLine(target As Range)
Application.EnableEvents = False
txtLog.Activate
txtLog.CurLine = (txtLog.LineCount - 1)
target.Select
Application.EnableEvents = True
End Sub

HTH,

Wouter
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
Textbox and multiline text Mats Samson Excel Worksheet Functions 0 September 18th 07 08:18 PM
Editing multiline textbox אלי Excel Programming 8 June 27th 07 08:04 AM
Multiline textbox for data entry אלי Excel Programming 2 June 12th 07 11:50 AM
Userform Textbox multiline Vs format in worksheet Jim May Excel Programming 4 October 16th 05 10:15 PM
Multiline textbox.. Can you have multiple font colors within? bdcrisp[_14_] Excel Programming 3 December 12th 03 12:51 PM


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

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"