View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Todd Huttenstine[_2_] Todd Huttenstine[_2_] is offline
external usenet poster
 
Posts: 237
Default 3 textbox values based on value in ComboBox1

This post was not the same post. I added more details.
Is there more detail needed?


-----Original Message-----
Please don't keep posting the same post.

If this is the same userform as in your option button

post, you have left
out any information on how it could be determined which

column the combobox
is displaying. Also, you have not talked about your

data - where is it
possible blanks would be found - are there blanks within

the populated
cells - would there be a ID, name and no email, a name

and email, but no id,
or are all blanks at the end of the column and if so,

then why specify row
53 as the end.

The easiest way to do this would be to populate the

combobox with all three
columns and get your data from there. Even if you only

want to display one
set of data, you could control this with the columnwidth.
Alternately, you could make the combobox have two columns

and place the row
number in the second column and hide that column.

Give it a whirl, then post your code if you have a

question.

--
Regards,
Tom Ogilvy

Todd Huttenstine

wrote in message
...
I have a userform that contains TextBox1, TextBox2,
TextBox3, and ComboBox1.

I have a table of data on Sheet2 Range A2:C52. Now a
value will be entered in ComboBox1. I need a code that
will try to match the value in ComboBox1 with a value in
Range A2:C52 on Sheet2. If a match is NOT found, then

do
nothing. If there IS a match with the value in

ComboBox1,
then I need for the code to put the corresponding data

in
the corresponding TextBoxes. The way it will do this is
as follows:

If the match is in a cell in Column A, then I need it to
put the data in that cell in Column A into TextBox1, and
then the corresponding data in the other 2 cells in the
columns into the corresponding 2 Textboxes.

If the match is in a cell in Column B, then I need it to
put the data in that cell in Column B into TextBox2 and
then the corresponding data in the other 2 cells in the
columns into the corresponding 2 Textboxes.

If the match is in a cell in Column C, then I need it to
put the data in that cell in Column C into TextBox3 and
then the corresponding data in the other 2 cells in the
columns into the corresponding 2 Textboxes.

Its kind of hard to explain so I hope I hope everyone
understands. If more info is required, please let me

know.


Thanx

Todd Huttenstine



.