Checking If A Sheet Exists In An External Closed Workbook

前端 未结 3 1536
星月不相逢
星月不相逢 2021-01-14 20:11

I want to test whether certain sheets in the current workbook exist in another closed workbook and return a message saying which sheet/s are causing errors.

I prefe

3条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-14 21:06

    Sub Tester()

    MsgBox (Not IsError(Application.ExecuteExcel4Macro("'C:\temp[temp.xlsm]Sheetxyz'!R1C1")))

    End Sub

提交回复
热议问题