LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 504
Default ListBox Scrolling in VBA

Thanks for your help!
--
Kevin


"Patrick Molloy" wrote:

dim index as long

after you add your items set the index to the listcount property then set
the list's listindex to this...

mylist.add something
index = mylist.listcount-1 '' zero based !
mylist.listindex = index


--
Patrick Molloy
Microsoft Excel MVP
---------------------------------
I Feel Great!
---------------------------------
"Kevin" wrote in message
...
Greetings!

In Excel 2000 I am using a ListBox on a UserForm to display the progress
of a lengthy procedure to the end user. As tasks are completed, I call the
ListBox.AddItem method to add items to the end of the list. The problem is
that the list soon becomes longer than what the ListBox viewable area can
accommodate. When this happens, Windows dutifully provides a scrollbar for
the user to scroll down to see subsequently added lines.

My question is: How can I make it scroll programatically so that the last
item in the list is always visible? I have searched and searched but
cannot seem to find the answer. Common sense (a dangerous thing) tells me
that the solution can't be as allusive as it seems.

If anyone knows how to do this, please let me know.

Thanks In Advance!
--
Kevin






 
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
Live Scrolling/Real-Time /Smooth Scrolling doesn't work for me in Excel 2003 [email protected] Excel Discussion (Misc queries) 0 May 12th 06 03:15 AM
How to get a listbox to move when scrolling down spreadsheet kdunnSBLI Excel Discussion (Misc queries) 1 June 24th 05 12:31 AM
Want listbox to move when scrolling down spreadsheet kdunnSBLI Excel Discussion (Misc queries) 3 June 23rd 05 11:11 PM
listbox scrolling with mouse Graham[_4_] Excel Programming 4 December 11th 03 05:58 PM
listbox.value not equal to listbox.list(listbox.listindex,0) ARB Excel Programming 0 October 22nd 03 12:46 AM


All times are GMT +1. The time now is 08:45 AM.

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"