Create a RowSource Depending on ComboBox Choice

G

Guest

Hi there

I have a userform where I select a date in the first combo box. (cmbPayDate)

Then, depending on whatever that choice is, I would like the next combo box
to be a selection of 7 dates for that pay week. (cmbDateWorked)

Can someone advise how I can do that??

Thank you in advance!



Mike L (NZ)
 
G

Guest

hi
not sure what you are asking for specificly but in therory a cascadeing
combo works something like this......
Private Sub ComboBox1_Change()
If ComboBox1.Value = "HPQEI" Then
ComboBox2.rowsource = "a16:a22"
Else
If ComboBox1.Value = "HPQBV" Then
ComboBox2.rowsource = "F1:F14"
End If
End If
End Sub
set the rowsource for combobox2 from combobox1 based on the value you select.
you may have to change the ranges.
pay with it

Regards
FSt1
 
G

Guest

hey there FSt1

thanks heaps for that!! i haven't had a play with it yet, but what you've
said makes sense!!

i'm sure i can get it going from that!!

cheers!



mike
 
G

Guest

hi
thanks for the feedback. and after reading my post i think i need to take a
course in spelling or maybe drink 1 less beer before posting.
oh well.

regards
FSt1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top