LIst box control on worksheet

vavs

Well-known Member
Joined
Jul 2, 2004
Messages
512
I have a worksheet that has a graph and a list box. Based on the list box selection, I am updating the dataset for the graph. I have a table area that contains all of the formulas and the correct ranges. I put a list box on the worksheet with a range of values that the user can select from. I named the listbox lbDept I have a macro assigned to the listbox Sub lbDept_Change() which should fire when a new value is selected. I have a variable Dept = lbDept.Value When the macro starts I get a 424 error when it tries to retrieve the lbDept.Value. I don't know why I am having so much difficulty with this but I am. Suggestions?

Once I get the value I have a case statement that copies the correct values into the dataset for display.
 

Some videos you may like

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

Watch MrExcel Video

Forum statistics

Threads
1,109,447
Messages
5,528,803
Members
409,837
Latest member
karnasrinivas
Top