ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   ComboBox Problem (https://www.excelbanter.com/excel-programming/333572-combobox-problem.html)

MBlake[_2_]

ComboBox Problem
 
Hi,
Please can anyone assist with a combobox problem?. I just can't figure out
why the following problem is occurring.

User selects a number from a listbox, that number uses vlookup to fill in
four text boxes. Textbox 3 then drives a combobox.

All works well until I make any change to the lookup table, if I change the
text to Capitals or add a new number to the list, then the combobox only
works once a user has selected a specific selection that is number 11 in the
list of available numbers.

Everything worked fine for the previous two months, now I am unable to make
any changes to the lookup table and this I must do frequently.

Any ideas would be greatly appreciated as I need desperately to get this
working again.

Thanks,
Mickey



STEVE BELL

ComboBox Problem
 
Not sure about your issue, but instead of lookup I use
the ListIndex number to find the information cell.

=======================================
x = Userform1.Listbox1.ListIndex +1

Userform1.TextBox1 = Sheets("MySheet").Cells(x,1)
=====================================

the +1 is because the listindex starts at 0

Cells(x,1) refers to Range("Ax")

--
steveB

Remove "AYN" from email to respond
"MBlake" wrote in message
...
Hi,
Please can anyone assist with a combobox problem?. I just can't figure out
why the following problem is occurring.

User selects a number from a listbox, that number uses vlookup to fill in
four text boxes. Textbox 3 then drives a combobox.

All works well until I make any change to the lookup table, if I change
the text to Capitals or add a new number to the list, then the combobox
only works once a user has selected a specific selection that is number 11
in the list of available numbers.

Everything worked fine for the previous two months, now I am unable to
make any changes to the lookup table and this I must do frequently.

Any ideas would be greatly appreciated as I need desperately to get this
working again.

Thanks,
Mickey




MBlake[_2_]

ComboBox Problem
 
Hi Steve,
Thanks for the response. I had a lot of help from this group when kicking
off my userform and VLOOKUP and this was the easiest method for me to learn
at the time. I am now adding more knowledge and will take on board your
suggestion of ListIndex along with a few others.

In the meantime I have solved my problem, it took some time but eventually
the light went on!. Having changed the lists from "RPU (2 spaces) 1" to
"RPU (1 space) 1", I forgot to make the same change to the lookup table!
DOH!

Thanks again,
Mickey



STEVE BELL

ComboBox Problem
 
Glad to hear your success!

keep on exceling....

--
steveB

Remove "AYN" from email to respond
"MBlake" wrote in message
...
Hi Steve,
Thanks for the response. I had a lot of help from this group when kicking
off my userform and VLOOKUP and this was the easiest method for me to
learn at the time. I am now adding more knowledge and will take on board
your suggestion of ListIndex along with a few others.

In the meantime I have solved my problem, it took some time but eventually
the light went on!. Having changed the lists from "RPU (2 spaces) 1" to
"RPU (1 space) 1", I forgot to make the same change to the lookup table!
DOH!

Thanks again,
Mickey





All times are GMT +1. The time now is 11:33 PM.

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