Hola! pixelmaniac. Podrías utilizar lo siguiente:
Código PHP:
Sub Colectar_Info()
'-------------------
' By Cacho Rodríguez
-------------------
Dim myBook$, myWsh As Worksheet, shDatos As Worksheet, i As Long
myBook = Dir(ThisWorkbook.Path & "\*.xls")
If myBook = "" Then
MsgBox "Sin libros de extensión xls en" & vbLf & _
"la carpeta " & ThisWorkbook.Path & "."
Exit Sub
End If
Set shDatos = Workbooks.Add(xlWBATWorksheet).ActiveSheet
shDatos.[a1:d1] = Array("Libro -> hoja", "Nombre empresa", "CIF", "Ingresos")
i = 1
Application.ScreenUpdating = False
Application.AutomationSecurity = msoAutomationSecurityForceDisable
Do
If myBook <> ThisWorkbook.Name And Right(myBook, 3) = "xls" Then
Workbooks.Open ThisWorkbook.Path & "\" & myBook, , True
For Each myWsh In ActiveWorkbook.Sheets
i = 1 + i
shDatos.Cells(i, "a").Resize(, 4) = _
Array(ActiveWorkbook.Name & " -> " & myWsh.Name, myWsh.[a1], myWsh.[b5], myWsh.[c4])
Next
ActiveWorkbook.Close False
End If
myBook = Dir
Loop Until myBook = ""
Application.AutomationSecurity = msoAutomationSecurityLow
Application.ScreenUpdating = True
End Sub
¿Te sirve la idea?...
Saludos, Cacho R.