Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to make listbox show the last item being added?
Hi! I have a list box in a form and it shows the running status. Fo example, many status are added to the list box as lstStatus.AddItem Doing action 1 lstStatus.AddItem Doing action 2 lstStatus.AddItem Doing action 3 lstStatus.AddItem Doing action 4 lstStatus.AddItem Doing action 5 lstStatus.AddItem Doing action 6 ... ... so on. As more actions are added to the list box, the list box does no automatically scroll down to show the latest one and user can only se the first few ones that fit into the height of the list box. My question is: how to make list box automatically scroll down to sho the last item that is added to the list box.? Please advise. Aijun -- Ai_Jun_Zhan ----------------------------------------------------------------------- Ai_Jun_Zhang's Profile: http://www.excelforum.com/member.php...fo&userid=2547 View this thread: http://www.excelforum.com/showthread.php?threadid=40017 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to make listbox show the last item being added?
Aijun,
It should be something like lstStatus.AddItem "Doing action 6" lstStatus.Listindex = lstStatus.Listcount-1 Robin Hammond www.enhanceddatasystems.com "Ai_Jun_Zhang" wrote in message news:Ai_Jun_Zhang.1ujnmd_1125349557.8293@excelforu m-nospam.com... Hi! I have a list box in a form and it shows the running status. For example, many status are added to the list box as lstStatus.AddItem Doing action 1 lstStatus.AddItem Doing action 2 lstStatus.AddItem Doing action 3 lstStatus.AddItem Doing action 4 lstStatus.AddItem Doing action 5 lstStatus.AddItem Doing action 6 .. .. so on. As more actions are added to the list box, the list box does not automatically scroll down to show the latest one and user can only see the first few ones that fit into the height of the list box. My question is: how to make list box automatically scroll down to show the last item that is added to the list box.? Please advise. Aijun. -- Ai_Jun_Zhang ------------------------------------------------------------------------ Ai_Jun_Zhang's Profile: http://www.excelforum.com/member.php...o&userid=25474 View this thread: http://www.excelforum.com/showthread...hreadid=400178 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to make listbox show the last item being added?
Robin, Thank you very much for the code. It works great! Aijun -- Ai_Jun_Zhan ----------------------------------------------------------------------- Ai_Jun_Zhang's Profile: http://www.excelforum.com/member.php...fo&userid=2547 View this thread: http://www.excelforum.com/showthread.php?threadid=40017 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro to ask for a item# and then show all details for that item | Excel Discussion (Misc queries) | |||
If certain item is picked, then text added... | Excel Discussion (Misc queries) | |||
in a excel file, how to make a menu item for the .xls file that when clicked on it runs myform.show? example plz | Excel Worksheet Functions | |||
Opening item from Listbox... Need Help :P | Excel Programming | |||
The value of a ListBox Item | Excel Programming |