Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Excel 2013 - Open workbook, copy worksheet into another workbook VBA

Excel 2013 - Open workbook, copy worksheet into another workbook VBA

Excel 2013 - Open workbook, copy worksheet into another workbook VBA


I can't believe this is causing me to much bother! I have a template workbook shakeout.xltm - what I want to do when running my macro is:

on click: open file dialog box which is at P:\data\misc

It to pause while I pick the xlsx file I want to use (there will be new files each month, so I can't hard code the filename)

When I've picked it, the file opens and then copies from the newly opened file to the shakeout.xltm workbook.

Then I'll repeat this so the next file is opened and copied.

I've been looking for examples to get me started, but I'm only getting quite old results which are giving errors.

I've got as far as the dialog box opening up, but it won't go to where I want it to.

ChDir "P:\data\misc"

workbookName = Application.GetOpenFilename("Excel Files (*.xls*), *.xls*") 

Someone please put me out of my misery!

thank you for helping


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close