98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Letting the User Select a spreadsheet to copy from | Excel forum
Letting the User Select a spreadsheet to copy from | Excel forum
Resolved · Low Priority · Version 2007
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
Mon 30 May 2011: Automatically marked as resolved.
Training information:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:Edit and format multiple worksheets in one operationTo select two or more non-adjacent worksheets, click on the tab of each worksheet, while holding down the [CTRL] key. |