Picking data out of a row

Tark221

Registered User.
Local time
Today, 09:15
Joined
Oct 12, 2012
Messages
74
Hey everyone

I have a for with a list of staff, on each row is the staff name, age, address and a few more details

I also have a view staff form, on the for i have a drop down of staff names and a few blank text boxes, I want to be able to pick a staff name from the drop down and when this happens all the information on the row of that staff member in the spread sheet to be displayed in the text boxes

Any ideas

thanks
 
Hey bob,

Cheers for the fast reply
I looked at those solutions, there looking at taking information from a form, im doing it from a row on a spreadsheet to a form
 
A screenshot or two from you uploaded to this forum (don't use public photo sharing sites as they are blocked at my workplace) might help in showing what you are trying to do.
 
c.jpg

Untitled.jpg
 
just to explain the worksheet where it says sickness and has 2 dates. i want to pick one of those dates from the drop down on the form and when one of those dates is picked it fills in the rest of the text in the boxes depending on whats in the same row as the date picked

hope tht helps
 
How are you populating the combo box with the dates?
 
Range("C9").Select
Range1 = Range(Selection, Selection.End(xlToRight)).Select
Range2 = Range(Selection, Selection.End(xlDown)).Select

Selection.Name = "tempSick"
Range("A1").Select

ListBox1.List = Range("tempSick").Value

I was thinking about doing it this way ive used it for something else and it seems to work i think lol
 
So far ive got

Dim rw As Long, cl As Range
staffName = TextBox8.Value

rw = WorksheetFunction.Match(Me.ComboBox1.Value, Worksheets(staffName).Range("A16:A18"), 0)
TextBox1 = Worksheets(staffName).Range("A" & rw).Offset(0, 1)
TextBox2 = Worksheets(staffName).Range("A" & rw).Offset(0, 2)
TextBox3 = Worksheets(staffName).Range("A" & rw).Offset(0, 3)
TextBox4 = Worksheets(staffName).Range("A" & rw).Offset(0, 4)

it doent error but it doesnt work
 
I believe you may need to use

UserFormNameHere.TextBox1 = ...etc.
UserFormNameHere.TextBox2 = ...etc.

or you can use the WITH:
Code:
With UserFormNameHere
   .TextBox1 = ...etc.
   .TextBox2 = ...etc.
End With

But can you upload a copy of the spreadsheet with fake data in it?
 

Users who are viewing this thread

Back
Top Bottom