View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] tammywilliams1604@yahoo.co.uk is offline
external usenet poster
 
Posts: 11
Default listbox not updating

hello,

i am new to this site but i need some help. i have a userform with a
listbox on it. the list box has 20 columns and upto 200 rows.

i populate the list box via the row source property.

i want to click on a row within the list and delete it. i can do this
as i find the row i am on by setting a variable to the list control
source which i have set elseware on another worksheet.

i have this code assigned to a command button on the form

sub deleterow ()
dim rgstack as range
clears = worksheets("sheet2").Range("a1")
Set rgstack = worksheets("sheet1").Range("a1:a2000").Find(what:= clears)
rgstack.EntireRow.Delete Shift:=xlUp
end sub


now here is the real problem, this code works fine on xl2000 but on
xl97 it works once then the second time the row does not disapear.

is it a code compatibility issue or is there a better way of updating a
list when deleting a row

regards
tammy