Option Explicit

Public Sub GetSheets()

Dim wbP As Workbook
Dim ws As Worksheet
Dim MySheets() As Variant
Dim index As Long
MySheets = Array("RULES", "CONDITIONS", "ROUTING", "ZONES")
Set wbP = Workbooks.Open("C:\MyProject.xls")

For index = LBound(MySheets, 1) To UBound(MySheets, 1)

Set ws = wbP.Worksheets(MySheets(index))

ws.Copy ThisWorkbook.Sheets(1)


Next


wbP.Close False



"ilyaskazi" wrote:

>
> import sheets
>
>
> i need to import sheets of following names from "MYProject.xls" in my
> new workbook.
>
> RULES, CONDITIONS, ROUTING, ZONES.
>
>
> Only check above sheet names in MyProject.xls and import in new wrkbk.
> If not found any then display its name in msgbox.
>
>
> --
> ilyaskazi
> ------------------------------------------------------------------------
> ilyaskazi's Profile: http://www.excelforum.com/member.php...o&userid=23969
> View this thread: http://www.excelforum.com/showthread...hreadid=376676
>
>