+ Reply to Thread
Results 1 to 2 of 2

macro to browse for workbook, pick up data and looping

  1. #1
    uriel78
    Guest

    macro to browse for workbook, pick up data and looping

    I've got several workbooks; in each workbook there are 4 sheets whose name
    is the same for ale the workbooks (call'em sheet1,2,3,4).
    In each sheets there are equally organized data (only values change form one
    sheet to another)

    In a new workbook ("summary") I wish I could have a macro that ask me to
    choose a workbook (maybe without opening it), pick up and copy data in
    sheet1 and paste in summary workbook. After doing this operation, I'd qant
    to be prompt if select another file to do the same operation (choose
    workbook, sheet, data ,copy& paste)...

    Is it possible...?




  2. #2
    Naomi
    Guest

    RE: macro to browse for workbook, pick up data and looping

    It is possible but the code is too long to write out here (and this is a
    programming question rather than function!).
    You would need code to do the following:

    Input box to prompt for file name (or cancel)-
    Inputbox(prompt, title etc)

    Use result to open file-
    Workbooks.open filename, readonly etc.

    Copy across results and close file-
    Worksheets.range().copy
    Selection.pastespecial xlvalues
    Workbooks().close savechanges=false

    Repeat.


    "uriel78" wrote:

    > I've got several workbooks; in each workbook there are 4 sheets whose name
    > is the same for ale the workbooks (call'em sheet1,2,3,4).
    > In each sheets there are equally organized data (only values change form one
    > sheet to another)
    >
    > In a new workbook ("summary") I wish I could have a macro that ask me to
    > choose a workbook (maybe without opening it), pick up and copy data in
    > sheet1 and paste in summary workbook. After doing this operation, I'd qant
    > to be prompt if select another file to do the same operation (choose
    > workbook, sheet, data ,copy& paste)...
    >
    > Is it possible...?
    >
    >
    >
    >


+ 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