MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Userform List Box not updating

Posted by Gary Hewitt-Long on December 23, 2001 12:59 AM

I have a userform which has a listbox which is linked to a sheet of data. Part of the forms job is under certain circumstances to delete a row of data. When this happens though the listbox still shows that data unless the form is closed and then re-opened.

Is there a way of making sure the listbox updates itself to only show what is actually in the sheet it is linked to?
It won't let me use Listbox1.update??


Gary Hewitt-Long

Posted by Ivan F Moala on December 23, 2001 1:59 AM

Excel2K works OK ?

Try reloading or referencing data rows again
eg when the data is changed put in command
ListBox1.RowSource = "A1:A10" or what ever the range is......



Posted by Gary Hewitt-Long on December 23, 2001 6:35 PM

Thanks, I have both 97 and 2000 and it was doing the same in both. As you suggested I have referenced the data again everywhere in the procedure where it might take a different route (If, Else and On Error) and it's now working.

Thanks again,

Gary Hewitt-Long