View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JW[_2_] JW[_2_] is offline
external usenet poster
 
Posts: 638
Default Getting info from all .xls files which are open

Yes, it is possible. But, you need to provide more info. Which sheet
in all of the open workbooks do you want to get the values from? Only
visible workbooks? Tweak as needed:
This will cycle through all of the open, visible workbooks and popup a
message box with that workbooks name.
Sub tester()
Dim wb As Workbook
For Each wb In Workbooks
If Windows(wb.Name).Visible = True Then MsgBox wb.Name
Next wb
End Sub

BZeyger wrote:
I want to open a .xls file named "INFO". This is a blank .xls worksheet. I
what to run a macro that will retreive information from all open .xls files,
(names not specified).

The user would open all the .xls files they want the information from. It
could be 6 or more different .xls files at one time. The macro would cycle
through each .xls file and retreive cell "a1", for example.
I would like to put the contents of all the "a1" cells into the "INFO" sheet.

Is this possible? To retreive info from all open .xls files without knowing
the names of the files. The user just has them open.