ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Help Please (https://www.excelbanter.com/excel-programming/306882-help-please.html)

Robert Couchman[_7_]

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

Tom Ogilvy

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




Robert Couchman[_7_]

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



.



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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com