#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Help Please

Please can i have some help??

i have a list box, the data contained is:
Staff no. (Column A), First Name (Column B), surname
(Column C)

i want to use a double click command what will display
data from the row on whcihc the data is contained (the
list box is filled using a search feature that will only
display the specific records needed)
i have tried using the list value (that would be
cell.value + " " + cell.offset(0,1).value + " " +
cell.offset(0,2).value, but this has not worked!!)

Please provide any help necessary for this project.

Many thanks,

Robert Couchman
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Help Please

Isn't staff no unique?

With Worksheets("Employees")
set rng = .Range(.cells(2,1),.cells(rows.count,1).End(xlup))
End with
res = Application.Match(clng(strStaffno),rng,0)
if not iserror(res) then
msgbox "Row is " & rng(res).Row
End if

--
Regards,
Tom Ogilvy


"Robert Couchman" wrote in message
...
Please can i have some help??

i have a list box, the data contained is:
Staff no. (Column A), First Name (Column B), surname
(Column C)

i want to use a double click command what will display
data from the row on whcihc the data is contained (the
list box is filled using a search feature that will only
display the specific records needed)
i have tried using the list value (that would be
cell.value + " " + cell.offset(0,1).value + " " +
cell.offset(0,2).value, but this has not worked!!)

Please provide any help necessary for this project.

Many thanks,

Robert Couchman



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Help Please

Yes... Staff No. is unique... but temp staff do not have a
staff number!!

how will i get the data off this row now then??

as when i double click a record in my list it needs to
open a form displaying all data for the individual.

Thank you for your help tho Tom!

Robert Couchman

-----Original Message-----
Isn't staff no unique?

With Worksheets("Employees")
set rng = .Range(.cells(2,1),.cells(rows.count,1).End

(xlup))
End with
res = Application.Match(clng(strStaffno),rng,0)
if not iserror(res) then
msgbox "Row is " & rng(res).Row
End if

--
Regards,
Tom Ogilvy


"Robert Couchman" wrote in message
...
Please can i have some help??

i have a list box, the data contained is:
Staff no. (Column A), First Name (Column B), surname
(Column C)

i want to use a double click command what will display
data from the row on whcihc the data is contained (the
list box is filled using a search feature that will only
display the specific records needed)
i have tried using the list value (that would be
cell.value + " " + cell.offset(0,1).value + " " +
cell.offset(0,2).value, but this has not worked!!)

Please provide any help necessary for this project.

Many thanks,

Robert Couchman



.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:54 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"