Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

letting user select spreadsheet

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Letting the User Select a spreadsheet to copy from

Letting the User Select a spreadsheet to copy from

ResolvedVersion 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 courses

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
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.

Excel tip:

Excel 2010 Shortcuts - Start and End of the Worksheet

Did you know you can quickly move to either the beginning or the end of an Excel Worksheet using just a couple of keys on the keyboard?

Press Ctrl + Home key to move the cursor to cell A1

Press Ctrl + End key to move the cursor to the end of the current worksheet.

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.09 secs.