ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   combobox values (https://www.excelbanter.com/excel-programming/361412-combobox-values.html)

Greg[_27_]

combobox values
 
Hi,
I have a userform with 10 comboboxes on it how do I use excel to check the
value of the other boxes on the form. so I do have not any duplicates of
items.

Thanks

Greg



Rick Hansen

combobox values
 
Greg, Here is some pseudo code that should get your started..

enjoy, Rick

Dim x as Integer, y as Integer

for x = 1 to 9
for y = x+1 to 10
if Me.CompoBox & x = Me.CompoBox & y then
MsgBox("Duplicate Found")
Exit For
endif
next y
next x



"Greg" wrote in message
...
Hi,
I have a userform with 10 comboboxes on it how do I use excel to check

the
value of the other boxes on the form. so I do have not any duplicates of
items.

Thanks

Greg





Greg[_27_]

combobox values
 
Thank you Rick

Greg
"Rick Hansen" wrote in message
...
Greg, Here is some pseudo code that should get your started..

enjoy, Rick

Dim x as Integer, y as Integer

for x = 1 to 9
for y = x+1 to 10
if Me.CompoBox & x = Me.CompoBox & y then
MsgBox("Duplicate Found")
Exit For
endif
next y
next x



"Greg" wrote in message
...
Hi,
I have a userform with 10 comboboxes on it how do I use excel to check

the
value of the other boxes on the form. so I do have not any duplicates of
items.

Thanks

Greg








All times are GMT +1. The time now is 01:16 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com