title: Automatically send an Email when the VBA code gives an error
body: <p>I am writing a VBA macro which is to be used by others who will not be VBA users. Hence, I would like to embed a system in the code which, when the code throws an error, automatically sends me an email from the outlook account of user of the macro. Would this be possible with VBA? Also, the user would not be having admin access to their account, will this create an issue? Thanks in advance for your help on this!</p>
  
  <p>EDIT - I now know that this is possible and also have a vba code for the same (see below). However, can we eliminate the "Security warning box" that pops up when we try to send the email automatically. Also, I would like to attach the erring file along with the email. It would be great if I get some help on this, Thanks!</p>