rename label captions based on a lookup from a listbox

jinx_uk_98

Board Regular
Joined
Jul 3, 2005
Messages
105
Hi Guys,

Thanks for the useful advice you've given so far, much appreciated.

Another one here I hope you can help with…..

On a sheet I have 2 columns, column A is a number and column B is a corresponding letter.

How can I get a list box on a form to list the unique characters, then, when the user select a letter in the listbox the captions of labels will change to reflect the values in the corresponding column.

Confused?

Hopefully this mock up will explain better

Many thanks
Kevin,


 

Some videos you may like

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,047
Office Version
  1. 365
Platform
  1. Windows
Kevin

Your examples are pretty hard to see.

Have you considered using a 2 column listbox?

With 1 column visible and code in it's change event to populate the textbox with the value from the other column.
 

jinx_uk_98

Board Regular
Joined
Jul 3, 2005
Messages
105
Sorry about the image but I can't seem to make it any bigger?

Have considered using 2 coulmn listbox but it's not really and option.

thanks
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,047
Office Version
  1. 365
Platform
  1. Windows

ADVERTISEMENT

Why not?
 

jinx_uk_98

Board Regular
Joined
Jul 3, 2005
Messages
105
because I only gave my requirment so I could get the basic idea then expand to meet my needs from there.

My real problem is like this:

I have 200 cells that require data to be entered into them but I want to do this via a userform.

The 200 cells can be divided in 4 major headings with 25 subheadings (cells) in each section. (these can be increased or decreased over time)

Rather than have 200 textboxes on my userform I wanted to list the 4 major heading then when a major heading is clicked the captions and visablity of the 25 labels and textboxes would be set.

hope this makes sense

Kevin
 

Watch MrExcel Video

Forum statistics

Threads
1,118,081
Messages
5,570,092
Members
412,310
Latest member
mark884
Top