Code to automatically email when xls file is save?

  • Thread starter Thread starter sherifffruitfly
  • Start date Start date
S

sherifffruitfly

Hi all,

I'm putting a little xl sheet out on a network drive for various
people to put bug reports in. It would be sweet if it would send me an
email whenever the file was saved. Is there code out here already that
achieves this?


Thanks in advance,

-sff
 
Hi all,

I'm putting a little xl sheet out on a network drive for various
people to put bug reports in. It would be sweet if it would send me an
email whenever the file was saved. Is there code out here already that
achieves this?

Thanks in advance,

-sff

So googling around yielded what I suppose is the obvious answer:

Sub Enable()
Application.EnableEvents = True
End Sub

Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)

ActiveWorkbook.SendMail _
Recipients:="(e-mail address removed)", _
Subject:="Bug Entered"

End Sub


And it results in the obvious problem: the #$^%$#^#$ security warning
that is un-turn-off-able. Sheesh.

We're using Office 2003 - what's the least intrusive workaround? Would
prefer just VBA code, if possible.

I knew there was a reason I don't do vba. grrr.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top