Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 17th, 2006, 09:34 AM
Authorized User
 
Join Date: Oct 2005
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Default Auto Scroll Listbox

Hi,

I've searched all through google and I can't seem to find a way to auto scroll a list box after an item is added. has anyone tried to do this before?? Please let me know.

 
Old May 17th, 2006, 09:48 AM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
Default

Hi Tready,

When you say auto scroll, are you wanting to bring the added item into view?

I would think that if you selected that item that it would scroll to it.

Mike

Mike
EchoVue.com
 
Old May 17th, 2006, 09:54 AM
Authorized User
 
Join Date: Oct 2005
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Is there a way to do that in code? Me and VBA are like distant cousins, I see it every now and then and never claim to know it.


 
Old May 19th, 2006, 05:32 AM
Authorized User
 
Join Date: Oct 2005
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm guessing this can't be done then?

 
Old May 23rd, 2007, 10:00 AM
Registered User
 
Join Date: May 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

i dont know if this will help, but I am making an app in VB2005 which uses a listbox as a log window. I was having this problem until i started playing with the TopIndex. Here is the code that I use:

Public Sub LogData(ByVal Data As String)
'Log Sub
        TestInt = Form1.ListBox1.TopIndex + 1
        'Get Last known location of TopIndex and add 1
        Form1.ListBox1.Items.Add(Data)
        'Add the data
        Form1.ListBox1.TopIndex = TestInt
        'Go to the new location
    End Sub


I dont know if it applies for VBA.

Regards,

jonas






Similar Threads
Thread Thread Starter Forum Replies Last Post
MOUSE SCROLL markizan Access 0 April 16th, 2008 08:26 PM
multiple Listbox values in another listbox terryv Excel VBA 0 June 27th, 2007 07:01 AM
Auto Refresh and Auto Delete deontae45 VB.NET 2002/2003 Basics 1 September 29th, 2006 04:53 PM
how to add scroll bars in asp.net listbox control DARSIN General .NET 3 January 26th, 2006 11:39 PM
I'm back :) Listbox var from listbox MichaelTJ .NET Web Services 2 October 21st, 2003 07:06 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.