PDA

View Full Version : populating lists



rt11
09-14-2007, 04:19 AM
hi guy's im new to this site i need some help for a prodject at work. i have made a work sheet with info in different coulms i have one coulm called function this has six options the next cloum is called instruments. i wont the function box to have all six functions in it. depending on the function there are options for the instruments for example in functions if you picked pumps you would only be able to pic the different pumps in the instruments collum. the code i am using is

Private Sub Funtion_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
'this part of the code selects which area to look at i.e bolier 5'
Sheets("test1").Range("b49").Value = Me.funtion.Value
If Sheets("test1").Range("b49") = "Sensor" Then
Me.unit.RowSource = "test1!sen"
End If
End Sub

thank you for your time and help

p.s im sorry if any words are spelt wrong im dysliekic

rory
09-14-2007, 04:49 AM
Is this on a userform or on a worksheet? If it's on a worksheet, you can use Data Validation to set up dropdown lists that depend on each other.

rt11
09-14-2007, 04:53 AM
iv set up the function anmd instruments on an exel work sheet but its for a user form

thanks

rt11

rory
09-14-2007, 06:38 AM
Can you post your workbook? (use the Go Advanced button and then Manage Attachments) so we can see what is where in your sheet and come up with specific code?