+ Reply to Thread
Results 1 to 6 of 6

Open and save files with macro, with dialog box

  1. #1
    Registered User
    Join Date
    12-05-2012
    Location
    Norway
    MS-Off Ver
    Excel 2010
    Posts
    4

    Open and save files with macro, with dialog box

    Hi
    Been lurking the board for a while now, and must say this is an awesome place to selfeducate and learn alot of tricks.

    However, I have a problem that I cant find an answer to. It goes like this:

    Click a button in Masterfile.xlsm -> Opens a dialog box with text "Chose file to collect data from:" -> Opens the file and copies text from a predetermined range (ie A1:C30) and paste it to another range (ie B1:D30) in the Masterfil

    Also, need another button: Click the button -> Opens a dialog box with text "chose filename" -> user writes filename -> Saves the file to a predetermined path with the filename written in the dialog box

    Thanks in advance!
    Last edited by kohedin; 12-19-2012 at 01:31 PM.

  2. #2
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Open and save files with macro, with dialog box

    Hi,

    could u plz provide 2 example workbooks one is masterfile and another one the data file.

    Thanks - Naveed.

  3. #3
    Registered User
    Join Date
    12-05-2012
    Location
    Norway
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Open and save files with macro, with dialog box

    Here is the basic idea of what I mean..
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Open and save files with macro, with dialog box

    k i will get back to u tmorrow

  5. #5
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Open and save files with macro, with dialog box

    Hi,

    please have test attached workbook and let me know is it what u looking or not.

    this will ask u to select a select file to import data in master file and this macro will copy only cells J2 to L15 and this will paste in master file in G2 to I14.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    12-05-2012
    Location
    Norway
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Open and save files with macro, with dialog box

    Perfect thanks alot Naveed

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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