Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 18
Default Create a RowSource Depending on ComboBox Choice

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)
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default Create a RowSource Depending on ComboBox Choice

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

"Blobbies" wrote:

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)

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 18
Default Create a RowSource Depending on ComboBox Choice

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

"FSt1" wrote:

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

"Blobbies" wrote:

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)

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default Create a RowSource Depending on ComboBox Choice

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

"Blobbies" wrote:

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

"FSt1" wrote:

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

"Blobbies" wrote:

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)

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
excel how to take choice of 75 rows - create form of 10 selectons John B[_2_] Excel Worksheet Functions 2 April 11th 07 01:46 PM
Create formula to choose price based on previous choice. lindsielynette Excel Worksheet Functions 2 January 11th 07 01:55 AM
Show pictures in excel depending of a choice! petterss Excel Discussion (Misc queries) 1 August 2nd 06 11:45 AM
help - create a multiple choice test [email protected] Excel Discussion (Misc queries) 2 July 17th 06 12:31 PM
How do i create a multiple choice drop down list Piper Charts and Charting in Excel 3 September 8th 05 12:40 AM


All times are GMT +1. The time now is 05:15 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"