Command Button to take me to the Drop-Down or List-Box's Selection on another sheet....

SpoodyJ

New Member
Joined
Aug 7, 2016
Messages
6
Thanks for taking the time to try and figure this one out!

At my work we keep a log of companies that do work for us (particularly create drawings/schematics).
We take their name and assign them a number. We call this an F#, which stands for Foreign Number (eg. F-125100-001 thru -999).

What I want to achieve is have a Main Page, that includes a Drop-Down List, or List-Box, or maybe even something better you know of? I keep thinking about it being a Drop-Down/List-Box one or the other.
So...
I'd like a Drop-Down/List-Box that contains all the Vendors names so that I could choose the Vendor and then have a Command Button that would take what is selected in the Drop-Down/List-Box and magically take me to the Vendors name and Info when pushed. I'm thinking have all the Vendors info on a separate sheet of course, there are as of now well over 500 Vendors, :eek: and we get new ones added every so often.

I'm am new to VBA/Macros, I have no doubt that there may be a better way to do this, but for days now, in my mind, I keep thinking this is achievable. My hopes are to find a way that I could get some code that essentially says "When Command Button is pushed with this particular List-Box/Drop-Down selection then go to cell #xxx" ("xxx" will be the cell that the selected vendor is located on a separate sheet). I could do that for every Vendor we have, or maybe there is a way I could take the drop down selection and have whatever is selected thrown into a "Find" or "LookUp" search of some kind that would take me to the desired vendor info.

I apologize that this was so long of a post! I've searched forums watched countless YouTube videos, started reading and searching through books, starting at the basics and working my way up in hopes I would run across an answer and I cannot seem to get close (I know, I just haven't learned enough yet) but at the same time I haven't been convinced that this isn't possible. If its not possible please let me know so I can stop trying to figure it out.:confused: I am open to other ways of doing this of course.

With Anticipation,

SpoodyJ
 
Thanks, Sunny Kow, Unfortunately... and I hate to say this.... I don't know where to put the code? :(
 
Upvote 0

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
I spoke too soon, I was expecting a UserForm TextBox and that's why I wasn't sure where to put it. I now have the code inserted under a CommandButton on the UserForm.

I did edit the Code just a bit so that the New Vendors Name would also appear at the end of the list on Sheet "VendorList". I know you did a short cut but I still wanted to keep
the Main list of vendors along with the WorkSheets.

This is the Code I added into what you gave me...


'Add Vendors Name to Sheet("VendorList")
Lastrow = Cells(Rows.Count, "A").End(xlUp).Row + 1
Cells(Lastrow, 1).Value = NewSheetName



SpoodyJ
 
Upvote 0
Hi SpoodyJ
My code below actually added the new vendor's name to your current list. Only that I am not sure which column it is.:LOL:

Code:
With Worksheets("VendorList")
        NextRow = .Range("A1").End(xlDown).Row + 1
        .Cells(NextRow, 1).Value = NewSheetName
 End With

I just assumed it was in column A of VendorList. Sorry, I was not aware that your button came from a USERFORM.
Hope you are able to modify the codes to suit your needs.
 
Upvote 0

Forum statistics

Threads
1,215,325
Messages
6,124,252
Members
449,149
Latest member
mwdbActuary

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
Back
Top