PDA

View Full Version : associate a list with a cell and get the selected value,using vba



Anusree
10-13-2010, 10:57 PM
Hi,
I have a macro enabled excel sheet. i have a button in sheet2 of this file. My requirement is:

1. when i click on the button in sheet2, i want to create a list which will have the values 'Item1','Item2' and 'Item3' and then i want to place this list in cell A1 of sheet1.
2. when i select a particular value from this list in A1 of sheet1, i want to get the value is selected from this list.

Is there any possible solution for the above. Please help.

Regards,
Anu

macropod
10-14-2010, 12:29 AM
Hi Anu,

You want the whole list to go into A1? If so, define a string in your code to hold the values, which you might separate with spaces. Then, use your code to loop through the search range, adding each found value to the list. When you're finished with the loop, write the contents of your string to A1.

If you have problems doing this, post the code to show what you're trying to do and someone here will probably be able to help you.