View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Toppers Toppers is offline
external usenet poster
 
Posts: 4,339
Default Re-Populate User Forms

Use MATCH:

Dim res as variant

res=Application.match(<TaskiD,<ListTaskIDs,0)
If iserror(res) then
Msgbox <Taskid & "not found"
else
' get data
res=<row number
textbox1.value=worksheets("Data").cells(res,"C")
....
.....
end if

Where
<Taskid is task id to match on
<ListTaskIds is list of task iDs e.g. named range (starting at row 1
...A1:A200 so res returns correct row number)

HTh

"Sam2" wrote:


Hi,

I'm using a user form for users to select data, then once finished its
populated on an excel spreadsheet, i have no problems with part, but my
question is if the users need to change any part of the historical data,
which is assigned a task number how do i repopulate the user form with
that particular task information? Once they are happy the data is
re-applied to the same row?

Any help would be appreciated..


--
Sam2
------------------------------------------------------------------------
Sam2's Profile: http://www.excelforum.com/member.php...o&userid=32899
View this thread: http://www.excelforum.com/showthread...hreadid=527131