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
|