Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <ol> <li><p><em>Am I using the WorkbookBeforeClose event correctly and is this effective &amp; efficient use of the event?</em></p> <blockquote> <p>I cant find any better event to use. However, I think a another approach would be to have <code>Save&amp;Close</code> function that uses the WorkbookBeforeSave event</p> </blockquote></li> <li><p><em>Should I use the Application level event <strike>or document level event</strike>?</em></p> <blockquote> <p>At the time of writing this, I would say yes. Since I am not able to created a document-level add-in with the tools I have, this is the best solution available. Had the tools been available, I would have modified the <code>_AssemblyName</code> and <code>_AssemblyLocation</code> document properties of the relevant files. However, I would have changed the solution strategy by using using templates and then saving the files as required. In addition prior to saving, having not explored this fully, to add/remove the correct document properties. The document-level event would have well suited using the approach described above. </p> </blockquote></li> <li><p><em>Is the behaviour described above normal?</em> </p> <blockquote> <p>Yes, but why? Because the add-in hooks into the application-level event, the checks and cancellation of the event blocks the application from closing any further workbooks. The key here is the ref bool cancel argument (cancel=false allows normal closing of the workbook(default), cancel=true prevents the workbook from closing). If I am wrong here, please let me know.</p> </blockquote></li> <li><p><em>Any other suggestions are welcomed when using workbook events in an add-in</em></p> <blockquote> <p>See above answers for alternative approaches and use of different events.</p> </blockquote></li> </ol>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload