+ Reply to Thread
Results 1 to 9 of 9

Macro to Open window so that I can select the file i need to open, then copy paste values

  1. #1
    Registered User
    Join Date
    11-24-2015
    Location
    New York
    MS-Off Ver
    2007
    Posts
    12

    Macro to Open window so that I can select the file i need to open, then copy paste values

    Hi Everyone,

    I am looking to have a macro that I would click the macro button and it would open the open file window and I would select the file to open. Then after I open the file I would like the macro to copy a few values from this file, lets say Cells G1, G4, G10, G15, and G22 from sheet "Detail" and copy them into the workbook with the macro button into cells AF1,AF2,AF3,AF4,AF5 of sheet "Summary".

    Please advise if you think this would be the best approach to my end goal, also if you can provide any code recommendations.

    Thanks
    Last edited by AnalystMH; 11-25-2015 at 05:45 PM.

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Macro to Open window so that I can select the file i need to open, then copy paste val

    Here's code for your button:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    11-24-2015
    Location
    New York
    MS-Off Ver
    2007
    Posts
    12

    Re: Macro to Open window so that I can select the file i need to open, then copy paste val

    Wow this is great, thank you

  4. #4
    Registered User
    Join Date
    11-24-2015
    Location
    New York
    MS-Off Ver
    2007
    Posts
    12

    Re: Macro to Open window so that I can select the file i need to open, then copy paste val

    There is only one small issue, it is pasting the numbers horizontally rather than vertically, so it is like AF1, AG1, AH1 rather than AF1, AF2, AF3
    Last edited by AnalystMH; 11-25-2015 at 07:15 PM.

  5. #5
    Registered User
    Join Date
    11-24-2015
    Location
    New York
    MS-Off Ver
    2007
    Posts
    12

    Re: Macro to Open window so that I can select the file i need to open, then copy paste val

    please advise

  6. #6
    Valued Forum Contributor meabrams's Avatar
    Join Date
    10-03-2014
    Location
    USA
    MS-Off Ver
    2007, 2010, 2013, 2016
    Posts
    451

    Re: Macro to Open window so that I can select the file i need to open, then copy paste val

    Heres the way I came up with it should work but doesn't look as clean on the vba side and run as quick

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    11-24-2015
    Location
    New York
    MS-Off Ver
    2007
    Posts
    12

    Re: Macro to Open window so that I can select the file i need to open, then copy paste val

    Thank you, you're right, it is a bit slower but it is 100% effective!

  8. #8
    Valued Forum Contributor meabrams's Avatar
    Join Date
    10-03-2014
    Location
    USA
    MS-Off Ver
    2007, 2010, 2013, 2016
    Posts
    451

    Re: Macro to Open window so that I can select the file i need to open, then copy paste val

    Hope others can help clean it up for you so that it runs faster

  9. #9
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Macro to Open window so that I can select the file i need to open, then copy paste val

    Oops! My Bad

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to make my macro recognise a 'File Download' window and select 'Open'
    By darossi in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-11-2012, 10:21 AM
  2. [SOLVED] Open specific folder, select file to open and copy then paste
    By Kranky in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-22-2012, 12:14 AM
  3. Macro to open rtf file, select all and copy
    By SoulBlader in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-19-2012, 11:48 PM
  4. [SOLVED] open variably named file, copy/paste data into consolidation file, open next file in list
    By sllawrence1968 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-29-2012, 09:49 PM
  5. macro to open, copy paste from existing excel file to a new blank file
    By 2blessed in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-15-2012, 06:05 PM
  6. HOW: Open Browse Window, Select File, Copy Filename Selected.
    By monak83 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-19-2012, 03:43 AM
  7. Copy, open file, and paste macro
    By Ohaern in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-13-2011, 11:45 AM
  8. Macro to open file, copy paste as values and save as excel html
    By gsav in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 03-18-2011, 10:15 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1