Click to See Complete Forum and Search --> : Drop down menu (Excel) please help...
zach007
Feb 15th, 2006, 12:19 AM
Dear Experts,
I am trying to make a drop down menu in Microsoft Excel 2003 using VBA as the following sample:
I create a drop down menu in B3...and has the following value: "01", "02" and "03"......what should I put the code in order to do like this:
If I select "02" it will appear automatically "pencil" on the C3....???
I attached my file for your review...if you need it... ;)
Thanks a lot for your kind helps..
Jennifer :)
thelocaluk
Feb 15th, 2006, 07:28 AM
How about this?
DKenny
Feb 15th, 2006, 07:49 AM
You don't need to use VBA to achieve this. You could use in-cell validation on Cell B2 and then pass the selected value to a lookup fuction to return the propper value. Here's an example.
zach007
Feb 16th, 2006, 01:28 AM
Hi,
To "DKenny": Thanks for your reply...it was amazing...But, how to make "step by step" walktrough for in-cell validation on Cell B2 and then pass the selected value to a lookup fuction to return the propper value please..??? Because I could not saw behind its codes.... :wave:
To "thelocaluk": Thanks for your reply...it was great and amazing...But, why when I saved it as "Save As Webpage"...It could not interactive anymore..???..it could not select the drop down menu...it look like a death spread sheet... :wave:
Thanks for your kind helps.... :)
thelocaluk
Feb 16th, 2006, 06:34 AM
I couldn't answer that as I'm a newbie myself, but maybe Dkenny will now? :rolleyes:
DKenny
Feb 16th, 2006, 08:41 AM
To "DKenny": Thanks for your reply...it was amazing...But, how to make "step by step" walktrough for in-cell validation on Cell B2 and then pass the selected value to a lookup fuction to return the propper value please..??? Because I could not saw behind its codes....
Steps to Implement in-cell validation with a resulting lookup
1/ Create a 2 column lookup table with your dataset. Lets assume its in cells F10:G15.
2/ Select the cell where you want the drop-down.
3/ Goto the Data==>Validation menu.
4/ Select "List" in the Allow dropdown.
5/ Check the "In-cell dropdown" option
6/ Make the source the first column of your lookup column.
7/ Click OK.
DebbieInFlorida
Feb 4th, 2011, 09:47 AM
How do you do this in VB.net???? I am creating the excel file, but need to add a dropdown list for a cell??
thanks.
thelocaluk
Feb 4th, 2011, 10:32 AM
See the attached example of how it works, you just need to select the cells you want the drop box then under "Data" select data validation and choose "List" in the allow box.
koolsid
Feb 4th, 2011, 03:39 PM
Debbie, please show the code that you are using to create the excel file in vb.net. I will develop the code on that and give it to you.
Sid
westconn1
Feb 4th, 2011, 05:12 PM
try recording macros in excel, then convert the generated code to .net
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.