R
Rik Smith
Hello all,
I'm using Excel 2000. I have a form with 7 frames, each with 10 comboboxes.
I can loop through all the boxes on each frame if I hardcode it.
for each control in userform1.frame1.controls...
I'd like to be able to change frame1 to a variable so I only have to use one
sub as opposed to 7.
dim x as ???
?set x = combobox1.parent?
for each control in userform1.x.controls...
Basically, I've written a sub that, on the combobox change event, will alert
the user if the same value is in more than one combobox in the same frame. I
don't want to prevent duplication, just let the user know with a msgbox. The
sub is written & works fine, I just can't make it work for more than one
frame. My plan is to declare a public variable, and set it's value in the
change event proc.
If my idea isn't possible, how can I find out what frame the combobox that
changed is in?
Thanks in advance,
Rik
I'm using Excel 2000. I have a form with 7 frames, each with 10 comboboxes.
I can loop through all the boxes on each frame if I hardcode it.
for each control in userform1.frame1.controls...
I'd like to be able to change frame1 to a variable so I only have to use one
sub as opposed to 7.
dim x as ???
?set x = combobox1.parent?
for each control in userform1.x.controls...
Basically, I've written a sub that, on the combobox change event, will alert
the user if the same value is in more than one combobox in the same frame. I
don't want to prevent duplication, just let the user know with a msgbox. The
sub is written & works fine, I just can't make it work for more than one
frame. My plan is to declare a public variable, and set it's value in the
change event proc.
If my idea isn't possible, how can I find out what frame the combobox that
changed is in?
Thanks in advance,
Rik