I need help to show the contents of a range in a listbox...

G

Guest

I have a long list in a sheet with 4 columns. Column 1 is the names, column
2 is class #, column 3 is ID #. column 4 is city name. I want to create a
combobox, with 3 listboxes. A combobox shows number 1 to 5 and many more
later. This case is 5 classes. When I selected a number in combobox for a
class, I wanted each listbox shows correct its contents of a rows in a column
as name, ID, city. The list of each name and class will more later.

Can someone help me to code that in a userform? Thanks.
Tvnguyen
 
M

moon

Tvnguye said:
I have a long list in a sheet with 4 columns. Column 1 is the names,
column
2 is class #, column 3 is ID #. column 4 is city name. I want to create
a
combobox, with 3 listboxes. A combobox shows number 1 to 5 and many more
later. This case is 5 classes. When I selected a number in combobox for
a
class, I wanted each listbox shows correct its contents of a rows in a
column
as name, ID, city. The list of each name and class will more later.

Can someone help me to code that in a userform? Thanks.
Tvnguyen


Maybe it's nicer to use 1 listbox with 3 columns, instead of 3 listboxes
with 1 column each. Some listbox samples with Name, Class, ID and City are
here:
http://www.geocities.com/xlsdemos/xls/LISTBOXDEMO.xls
(83kB)
 
G

Guest

Hi Moon,
Thank you very much for your help.
Your help is very wonderful. I will study your codes in both forms to apply
to my work. Probably later when I have the problems in visual basic, may I
send the question to you? Please let me know?

Thank you very much.
Tvnguye
 
M

moon

Tvnguye said:
Hi Moon,
Thank you very much for your help.
Your help is very wonderful. I will study your codes in both forms to
apply
to my work. Probably later when I have the problems in visual basic, may
I
send the question to you? Please let me know?

Thank you very much.
Tvnguye


Hello,

Yes, of course it's okay to send the questions.
Good luck for now.

moon
 
G

Guest

9/26/06

Hi Moon,

I thank you very much for your help last time. I learned a lot from your
help. This time I would like to add another ComboBox to show the names, and
3 TextBoxes to show correct cells of each name, such as class, ID, City. I
assume that some name is duplicated because each person can study more than
one class, and some time there are some persons with the same name. I don’t
know I should use 1 or 3 TextBoxes or another way that I don’t know yet, but
I hope you know the best way to do this. Also how to have the column
headings in textbox or listbox? Can you help me for this case? Thank you in
advance.
Tvnguyen
 
M

moon

Tvnguye said:
9/26/06

Hi Moon,

I thank you very much for your help last time. I learned a lot from your
help. This time I would like to add another ComboBox to show the names,
and
3 TextBoxes to show correct cells of each name, such as class, ID, City.
I
assume that some name is duplicated because each person can study more
than
one class, and some time there are some persons with the same name. I don't
know I should use 1 or 3 TextBoxes or another way that I don't know yet,
but
I hope you know the best way to do this. Also how to have the column
headings in textbox or listbox? Can you help me for this case? Thank you
in
advance.
Tvnguyen

Hi there again,

I updated 'your' file http://www.geocities.com/xlsdemos/xls/LISTBOXDEMO.xls
and added two more form samples. One listbox uses a rowsource (with
columnheads), the other sample uses an array to fill the list.
Please check it out, I hope it will help.


moon
 
G

Guest

9/28/06
Hi Moon,

I really appreciated with your help and your program in DVD/CD Collection is
very wonderful. There is some error showed when I click at: Import or Export
CD/DVD.

Public Function DoPrepareImport(ByVal SheetName As String) As Integer
It showed error at Chr$(0)

Some buttons in Info tabsheet show error in Add/Delete/Upgrade buttons
Error in Headquarter with Sort button

Why do I get errors? Do you have errors on this yet? Can you review it and
fix errors for me?
I like the program for CD/DVD collection. I have to modify it to fit with
my one.
Thank you very much.
Tvnguyen
*(this sent to (e-mail address removed), but no reply. So sent here)
 
M

moon

Yo,

I really replied to your e-mail, so I don't see why u didn't get it. Maybe
some delay.

My MM20 works fine here, but I'm still running Excel 2000. If you run 2003,
2007 or 97, errors might occur.

I think the buttons on the infosheet are not errors - you can't add a record
if you are in infosheet, only in DVD or CD list. The first item in the list
should be added manually in the worksheet. If there is at least one item,
then you can use the form.
I admit that's quite lousy, but fixing such private projects never has
priority here.

moon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top