+ Reply to Thread
Results 1 to 3 of 3

Drop down menu that links to a sheet in another workbook

  1. #1
    Registered User
    Join Date
    01-12-2022
    Location
    netherlands
    MS-Off Ver
    365
    Posts
    7

    Drop down menu that links to a sheet in another workbook

    Hey everyone,

    I am trying to figure out how to do the following

    1. I have a dropdown menu with the names of the sheets in another workbook
    2. When the user selects a option from that dropdown and clicks a "run macro" button the macro will go to the other workbook > go to the sheet with the same name as in the dropdown and copy A1 and paste it back in the original workbook.


    It sounds relatively simple but I could not figure it out at all.

    Thanks in advance for any help I can get, i absolutly love this forum!

  2. #2
    Valued Forum Contributor ranman256's Avatar
    Join Date
    07-29-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    1,189

    Re: Drop down menu that links to a sheet in another workbook

    paste this code into a module. It will open the file chosen. Your button will run: Open1File

    Open1File will launch the function with the chosen cell value that has the file.
    in the example below it is cell E2
    OpenNativeApp Range("E2").Value

    cell E2 is filled when user picks an item from the combo box. (the index of the choice is put in E1)
    but Vlookup fills in the actual value of the file into E2 using Vlookup:
    E2.formula = VLOOKUP(colShown, RangeOfData, colOfFiles,0)



    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    01-12-2022
    Location
    netherlands
    MS-Off Ver
    365
    Posts
    7

    Re: Drop down menu that links to a sheet in another workbook

    Hey RanMan,

    Thank for your help! It works but it does not exactly what I want it to do. Maybe I can make it a bit different so that there are less variables.

    Lets remove the button as I think that will only give me headache (not you im just not that good with excel)

    Is it possible to have a name in cell A2 and with that name go to a pre detiremed workbook and go to a worksheet in that workbook that has the same name as the cell in A2 that we just selected?

    So for example A2 in Workbook Y = Pirate
    So it will go to workbook X and go to the sheet thats called Pirate

    I hope this makes it easier for me to understand. Sorry if i caused any confusion and many thanks again!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 11-04-2013, 01:14 PM
  2. Replies: 1
    Last Post: 02-07-2013, 11:03 AM
  3. select a sheet from a drop down menu and move the row in the selected sheet
    By AlienPump in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-27-2012, 02:21 PM
  4. Variable Links from drop down menu
    By FakeBryan in forum Excel General
    Replies: 1
    Last Post: 01-14-2012, 01:18 AM
  5. Drop down menu generates file links to be open
    By Drunk_Masta in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-20-2008, 03:34 AM
  6. [SOLVED] Drop down menu-How do you produce a drop down menu in a single cell in Excel
    By Freddo in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-04-2006, 04:35 AM
  7. [SOLVED] drop dowm menu for excel workbook worksheets.
    By De Mello, Pioneer Laughlin, nv. in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-17-2005, 07:00 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1