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,


 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,344
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,344
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
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,995
Messages
5,834,779
Members
430,321
Latest member
yemisimi11

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top