PDA

View Full Version : VBA to obtain another workbook's worksheets into a drop down list



kevinkar
02-05-2015, 07:33 AM
Hello all,

I'm new to object-oriented coding and I've searched through many forums looking for some baseline VBA code to get me started on my Excel task. What I want the VBA code to do is to ask the user to choose an Excel file from any directory on the system and then to create a drop down list of that workbook's worksheets. I have found code to do these tasks, but separately (eg. - code to choose a file and code to list worksheet names in a separate sheet). In addition to the drop down list, the file path of that workbook should also be stored in a cell in the current workbook with said VBA code. From here I intend to use VBA code to do some analysis on the data within that workbook's worksheet (all the formatting within the selected file will be the same).

Any help or guidance is much appreciated!