Hi,
Can anyone explain the differences between both command? Which is better ? I found it have the same function
I have used Schedule tasks to open workbook and Auto_Open() running as usual.
Hi,
Can anyone explain the differences between both command? Which is better ? I found it have the same function
I have used Schedule tasks to open workbook and Auto_Open() running as usual.
Last edited by Faridwahidi; 11-12-2014 at 10:20 AM.
Hi, Farid,
AFRAIR Auto_Open is from "old times" while Workbook_Open was introduced with Excel97 and should be used from then on due to the changes in the event section of the VBA-code. Workbook_Open is called prior to Auto_Open. IŽd recommend to use Workbook_Open in ThisWorkbook and just remember Auto_Open in a standard module but not use that command any more (maybe MS decides one day to stop the support of that function although I pretty much doubt that with all the other functions still being supported).
Ciao,
Holger
Use Code-Tags for showing your code: [code] Your Code here [/code]
Please mark your question Solved if there has been offered a solution that works fine for you
Hi Holger,
Many thanks for clarification![]()
The main difference, besides the location of the code, is that when you open a workbook in code, the Auto_Open won't automatically run - you have to call it explicitly - whereas Workbook_Open will run unless you disable events.
Everyone who confuses correlation and causation ends up dead.
[.... incorrect comment deleted ....]
Last edited by joeu2004; 11-12-2014 at 06:43 PM. Reason: incorrect
Hi Rory,
Thanks.
Thanks.![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks