Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
uriel78
 
Posts: n/a
Default 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   Report Post  
Naomi
 
Posts: n/a
Default

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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 01:12 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"