I have an excel sheet that has two sheets. One sheet is hidden that has a list of values called "Location." On the main sheet I have created a drop down menu that pulls from the hidden sheet.
How can I store these values in an external file (Excel, .txt, etc.) so I can hit a macro button (VBA) that will replace/update the list on the hidden sheet with any/all new Location values that will be stored in an external file?
I believe this is what you are looking for:
It opens an external txt file called strFileToImport and reads row by row from the txt file and writes it into the SheetWithLocations.
Let it assume it that the filepath of the external file that contains locations is: "D:\Location.xls"
Location.xls has only one Sheet named as 'sheet1' which has the following structure:
and the filepath of the Working Excel File having two WorkSheets (as you have discussed above) is 'D:\MyWokingFileName.xls'
As you said the 'MyWokingFileName.xls' has two sheets, let it assume that the sheets are 'sheet1' and 'sheet2' and sheet2 is hidden.
Now you want a MacroButton on sheet1 to Update Values in sheet2 of the MyWokingFileName.xls.
So the Code for the Macro would be: