The Gunslinger
Board Regular
- Joined
- Dec 28, 2003
- Messages
- 76
Hi guys,
Got a little problem, not least of which is that i havent worked in excel vba for ages, so i'm super rusty and forgotten half of the little i knew in the first place !
anyway, i have a button on a sheet in a work book, which when selected opens an input box for the user to enter a word or phrase, the code then searches a particular column for a match and then transfers the row records for each match on that sheet to a new sheet, and also the searched phrase to the same sheet as part of the title text.
This works perfectly well, however, i'm now trying to update it and replace the inputbox with a userform with a combobox, so that i can auto populate the list in the combo box with all of the available "phrases" that the user is likely to search by, so as they type it auto suggests entries, this removes the human error of misspelling etc.
I have this working perfectly well..... however, once i have selected or typed the entry i have 2 issues
1. I'd like the combobox to respond to the enter key instead of just tabbing to the "Go" button on the userform
and
2. This is the big error, i can't seem to get the combobox selection, the final value if you like transfered back to my original code.
The original code is in the worksheet section for the sheet the command button is embedded, and obviously the userform is in the userforms module, i can call the userform module easily by using the .show command in place of my original inputbox code "tSearchRslts = Inputbox....", but once the userform is closed, it does not return to my worksheet code and continue on from that point
any help would be appreciated, i'm sorry i dont have a copy of the code right now as i forgot to email it home form work lastnight.
I will continue to search through the forum for an answer, but many of the results deal with transferring the selection back into the worksheet, and i dont want that
Got a little problem, not least of which is that i havent worked in excel vba for ages, so i'm super rusty and forgotten half of the little i knew in the first place !
anyway, i have a button on a sheet in a work book, which when selected opens an input box for the user to enter a word or phrase, the code then searches a particular column for a match and then transfers the row records for each match on that sheet to a new sheet, and also the searched phrase to the same sheet as part of the title text.
This works perfectly well, however, i'm now trying to update it and replace the inputbox with a userform with a combobox, so that i can auto populate the list in the combo box with all of the available "phrases" that the user is likely to search by, so as they type it auto suggests entries, this removes the human error of misspelling etc.
I have this working perfectly well..... however, once i have selected or typed the entry i have 2 issues
1. I'd like the combobox to respond to the enter key instead of just tabbing to the "Go" button on the userform
and
2. This is the big error, i can't seem to get the combobox selection, the final value if you like transfered back to my original code.
The original code is in the worksheet section for the sheet the command button is embedded, and obviously the userform is in the userforms module, i can call the userform module easily by using the .show command in place of my original inputbox code "tSearchRslts = Inputbox....", but once the userform is closed, it does not return to my worksheet code and continue on from that point

any help would be appreciated, i'm sorry i dont have a copy of the code right now as i forgot to email it home form work lastnight.
I will continue to search through the forum for an answer, but many of the results deal with transferring the selection back into the worksheet, and i dont want that