Joe has attended:
Excel VBA Intro Intermediate course
Excel Advanced - For Power Users course
Letting the User Select a spreadsheet to copy from
Is there some simple code, where by a user is prompted to select a file where the data contained can be copied into the main file, and then close the file they chose, allowing them to retunr to the main document to work on the copied data?
RE: Letting the User Select a spreadsheet to copy from
Hi Joe, thanks for your query. There's no one line of code to do all that, as it involves several different procedures. First you need to capture the name of the file the user is interested in. Here's a useful walkthough of how to activate and gather information using the Excel dialog boxes.
http://www.ozgrid.com/VBA/ExcelsDialogBoxes.htm
Once you've got the filename, it's up to you how you want to code the rest. Perhaps code the opening of the file, the display of a userform with the Ref.Edit control allowing the user to select and OK a range of their choice, then the closure of that file, returning the user to the original file and allowing them to paste in the data. That's "all" there is to it!
Hope this helps,
Anthony