4

How i can open a workbook without the Auto_Open running using Jacob ??

Community
  • 1
  • 1
khaled Rihane
  • 607
  • 2
  • 7
  • 19
  • If `Auto_Open` does not provide the specification of use, describe that exact specification. Otherwise this seems an [XY problem](http://meta.stackexchange.com/questions/66377/what-is-the-xy-problem) (or a close variant). – Andrew Thompson Mar 25 '13 at 10:57
  • I would like to call a Subroutine from VB Macro without running this macro or it contains a workbook_Open which triggers automatically when i do: ` Dispatch workBook = workbooks.call(excel, "Open",file.getAbsolutePath()).toDispatch() ` using Jacob – khaled Rihane Mar 25 '13 at 13:21
  • 1
    finaly, I resolve my problem by this instruction: `excel.setProperty("EnableEvents", new Variant(false));` – khaled Rihane Mar 25 '13 at 13:58
  • you're welcom @khalidlblid :) – Our Man in Bananas Mar 25 '13 at 15:49

1 Answers1

1

try this:

excel.setProperty("EnableEvents", new Variant(false));
Our Man in Bananas
  • 5,809
  • 21
  • 91
  • 148