View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Eddy[_3_] Eddy[_3_] is offline
external usenet poster
 
Posts: 15
Default get a sheet of a Excel file

Start from here

Sub ImportSheet()
Dim Wkb As Workbook
Dim Wkt As Worksheet
Dim MsgStr As String
For Each Wkb In Application.Workbooks
If Wkb.Name < ThisWorkbook.Name Then
For Each Wkt In Wkb.Worksheets
MsgStr = "Import " & Wkt.Name & " from " & Wkb.Name & "? "
If MsgBox(MsgStr, vbYesNo) = vbYes Then
Wkt.Copy Befo=ThisWorkbook.Sheets(1)
End If
Next
End If
Next
End Sub

"Deer Hunter" ¼¶¼g©ó¶l¥ó ...
Hi!

Has somebody an example how I get an overview of all sheets of an external
excel file, select one sheet and import this sheet into the open current
worksheet?
All suggestions are welcome!

Regards,

Mike