View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Patrick Molloy[_2_] Patrick Molloy[_2_] is offline
external usenet poster
 
Posts: 1,298
Default Populate values and insert row

its not clear what you need
there are many ways to get values into a userform.
The follwoing code will populate a listbox from column A in sheet1

rw = 1
with worksheets("Sheets1")
do until .Cells(rw,1)=""
listbox1.AddItem .cells(rw,1)
rw = rw+1
loop
End with

put this in a sub on the form's code page, then call the sun from the
userform initialse event







"Hasan" wrote:

Hi,

I am looking for a macro that should populate Sheet1 values in
userform and check for the same values in cloumn A of sheet2(where the
macro resides). If the value is found in(Sheet2) then look for the
next filled cell in column A and insert row above.

Thanks in advance