Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tox Tox is offline
external usenet poster
 
Posts: 1
Default Question about the TextBox control

Windows XP SP2
Excel 2002 SP3

I have a textbox on a userform, and it gets populated with road names. I
use the vbCrLf keyword to put each road name on a new line in the textbox.
If the road name list gets too long, a vertical scrollbar is added to the
control. What I want to do is on those occasions when a scrollbar is added,
is to have the scrollbar slider positioned all the way at the top when all
is said and done. This way the first road name is always visible.

FYI, the userform isn't shown until the very end.

-gk-


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Question about the TextBox control

I suppose you have good reason to use a textbox to mimic a listbox....
Anyway, look into the various .Selxxx properties of the textbox.
You cannot tell (easily) when the scroll bar appears, so just set
..SelStart=0 each time you add to the textbox.

NickHK

"Tox" wrote in message
...
Windows XP SP2
Excel 2002 SP3

I have a textbox on a userform, and it gets populated with road names. I
use the vbCrLf keyword to put each road name on a new line in the textbox.
If the road name list gets too long, a vertical scrollbar is added to the
control. What I want to do is on those occasions when a scrollbar is

added,
is to have the scrollbar slider positioned all the way at the top when all
is said and done. This way the first road name is always visible.

FYI, the userform isn't shown until the very end.

-gk-




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
How to control TextBox ? Golenboy Excel Programming 2 March 27th 07 01:49 PM
How to move cursor from one textbox control to another textbox con Tom Ogilvy Excel Programming 1 September 16th 04 03:42 PM
How to move cursor from one textbox control to another textbox con KMoore007 Excel Programming 0 September 16th 04 02:47 PM
Set Focus Problem for textbox control on multipage control ExcelDeveloperSPR Excel Programming 1 July 16th 04 08:54 PM
ActiveX Control (TextBox) question Stuart[_5_] Excel Programming 2 July 4th 04 12:37 PM


All times are GMT +1. The time now is 08:57 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"